|
17 | 17 |
|
18 | 18 | jobs: |
19 | 19 | deploy: |
20 | | - runs-on: ubuntu-20.04 |
| 20 | + runs-on: ubuntu-22.04 |
21 | 21 | concurrency: |
22 | 22 | group: ${{ github.workflow }}-${{ github.ref }} |
23 | 23 | steps: |
24 | | - - uses: actions/checkout@v2 |
| 24 | + - uses: actions/checkout@v4 |
25 | 25 | with: |
26 | 26 | submodules: true # Fetch Hugo themes (true OR recursive) |
27 | 27 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod |
28 | 28 |
|
29 | 29 | - name: Setup Python |
30 | | - uses: actions/setup-python@v2 |
| 30 | + uses: actions/setup-python@v5 |
31 | 31 | with: |
32 | | - python-version: '3.9' |
| 32 | + python-version: '3.11' |
| 33 | + cache: 'pip' |
33 | 34 |
|
34 | 35 | - name: Setup Hugo |
35 | | - uses: peaceiris/actions-hugo@v2 |
| 36 | + uses: peaceiris/actions-hugo@v3 |
36 | 37 | with: |
37 | | - hugo-version: '0.140.2' |
| 38 | + hugo-version: '0.143.1' |
38 | 39 | extended: true |
39 | 40 |
|
40 | 41 | - name: Setup Node |
41 | | - uses: actions/setup-node@v2 |
| 42 | + uses: actions/setup-node@v4 |
42 | 43 | with: |
43 | | - node-version: '20' |
| 44 | + node-version: 20 |
| 45 | + cache: npm |
44 | 46 |
|
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: | |
54 | 49 | python -m pip install arxiv requests unidecode ujson |
55 | 50 | python scripts/cobiss_parser.py |
56 | | - - run: npm ci |
57 | | - - run: hugo --gc --minify --environment production --baseURL=https://sensorlab.github.io/ |
58 | 51 |
|
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' |
62 | 61 | with: |
63 | 62 | github_token: ${{ secrets.GITHUB_TOKEN }} |
64 | 63 | publish_dir: ./public |
0 commit comments