/ concept-collection / benchcompress
concept-collection / benchcompress
benchcompress / .github / workflows / deploy-gh-pages.yml
67 lines · 1.5 KBBlameHistoryRaw
1name: Deploy to GitHub Pages
3on:
4 push:
5 branches: ['main']
6 paths:
7 - 'web-ui/**'
8 - 'paper/**'
9 workflow_dispatch:
11# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
12permissions:
13 contents: read
14 pages: write
15 id-token: write
17# Allow one concurrent deployment
18concurrency:
19 group: 'pages'
20 cancel-in-progress: true
22jobs:
23 deploy:
24 environment:
25 name: github-pages
26 url: ${{ steps.deployment.outputs.page_url }}
27 runs-on: ubuntu-latest
28 steps:
29 - name: Checkout
30 uses: actions/checkout@v4
32 - name: Install pandoc and texlive
33 run: |
34 sudo apt-get update
35 sudo apt-get install -y pandoc texlive-latex-recommended
37 - name: Setup Node.js
38 uses: actions/setup-node@v3
39 with:
40 node-version: '20'
41 cache: 'npm'
42 cache-dependency-path: web-ui/package-lock.json
44 - name: Build paper
45 run: |
46 chmod +x devel/copy_paper_to_web.sh
47 ./devel/copy_paper_to_web.sh
49 - name: Install dependencies
50 working-directory: web-ui
51 run: npm ci
53 - name: Build website
54 working-directory: web-ui
55 run: npm run build
57 - name: Setup Pages
58 uses: actions/configure-pages@v4
60 - name: Upload artifact
61 uses: actions/upload-pages-artifact@v3
62 with:
63 path: ./web-ui/dist
65 - name: Deploy to GitHub Pages
66 id: deployment
67 uses: actions/deploy-pages@v4