-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.6 KB
/
github-pages-deploy-main.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
48
49
50
51
52
53
54
55
name: "GitHub pages: deploy main"
on:
push:
branches:
- main
schedule:
- cron: "22 6 * * *"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: sudo apt install libfontconfig1-dev libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python packages
run: |
pip install -r requirements.txt
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'renv'
- name: Fetch from / populate R package cache
uses: actions/cache@v4
with:
key: r-${{ hashFiles('renv.lock') }}
path: |
~/.cache/R/renv
- name: Install R packages
run: |
Rscript -e 'options(warn = 2); install.packages("renv", repos="https://cloud.r-project.org")'
Rscript -e 'options(warn = 2); renv::restore()'
- name: Install Javascript packages
run: |
npm ci
- name: Build
run: |
npm run build
- name: Make sure to not run Jekyll
run: touch dist/.nojekyll
- name: Set CNAME
run: echo "trade-and-investment-factsheets.docs.trade.gov.uk" >> dist/CNAME
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
force: false
clean-exclude: preview/
folder: dist
branch: gh-pages