Skip to content

Commit 30abf83

Browse files
committed
update GitHub actions for GH Pages
1 parent b067da4 commit 30abf83

1 file changed

Lines changed: 21 additions & 22 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,47 @@ env:
1717

1818
jobs:
1919
deploy:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-22.04
2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.ref }}
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
with:
2626
submodules: true # Fetch Hugo themes (true OR recursive)
2727
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
2828

2929
- name: Setup Python
30-
uses: actions/setup-python@v2
30+
uses: actions/setup-python@v5
3131
with:
32-
python-version: '3.9'
32+
python-version: '3.11'
33+
cache: 'pip'
3334

3435
- name: Setup Hugo
35-
uses: peaceiris/actions-hugo@v2
36+
uses: peaceiris/actions-hugo@v3
3637
with:
37-
hugo-version: '0.140.2'
38+
hugo-version: '0.143.1'
3839
extended: true
3940

4041
- name: Setup Node
41-
uses: actions/setup-node@v2
42+
uses: actions/setup-node@v4
4243
with:
43-
node-version: '20'
44+
node-version: 20
45+
cache: npm
4446

45-
- name: Cache dependencies
46-
uses: actions/cache@v2
47-
with:
48-
path: ~/.npm
49-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
50-
restore-keys: |
51-
${{ runner.os }}-node-
52-
53-
- run: |
47+
- name: Pull COBISS and ArXiv metadata
48+
run: |
5449
python -m pip install arxiv requests unidecode ujson
5550
python scripts/cobiss_parser.py
56-
- run: npm ci
57-
- run: hugo --gc --minify --environment production --baseURL=https://sensorlab.github.io/
5851
59-
- name: Deploy
60-
uses: peaceiris/actions-gh-pages@v3
61-
if: ${{ github.ref == 'refs/heads/main' }}
52+
- name: Install NodeJS dependencies
53+
run: npm ci
54+
55+
- name: Build Hugo static page
56+
run: hugo --gc --minify --environment production --baseURL=https://sensorlab.github.io/
57+
58+
- name: Deploy to GitHub Pages
59+
uses: peaceiris/actions-gh-pages@v4
60+
if: github.ref == 'refs/heads/main'
6261
with:
6362
github_token: ${{ secrets.GITHUB_TOKEN }}
6463
publish_dir: ./public

0 commit comments

Comments
 (0)