-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (45 loc) · 1.47 KB
/
prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Example output
on:
push:
branches:
- master
jobs:
xaringan-presentations:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
container: inseefrlab/utilitr:latest
steps:
- name: Checkout Repository
env:
GITHUB_PAT: ${{ secrets.PAT_GITHUB }}
uses: actions/checkout@master
- name: Install Dependencies
env:
GITHUB_PAT: ${{ secrets.PAT_GITHUB }}
run: |
Rscript -e "install.packages(c('remotes'))"
Rscript -e "remotes::install_deps(dependencies = TRUE)"
- name: Render
run: |
mkdir -p public
Rscript -e 'source("build/build.R")'
- uses: actions/upload-artifact@v2
with:
name: Slides
path: public/
retention-days: 3
- name: Install npm
if: ${{ github.repository == 'inseefrlab/utilitr-presentation' }}
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Deploy to Netlify
if: ${{ github.repository == 'inseefrlab/utilitr-presentation' }}
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: |
npm install --unsafe-perm=true netlify-cli -g
netlify init
netlify deploy --prod --dir="public" --message "Deploy master"