/ concept-collection / benchcompress
Sign in
concept-collection / benchcompress
benchcompress / .github / workflows / deploy-gh-pages.yml
49 lines · 1.2 KBBlameHistoryRaw
1name: Deploy to GitHub Pages
2on:
3 push:
4 branches: ['main']
5 paths:
6 - 'web-ui/**'
7 workflow_dispatch:
9# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
10permissions:
11 contents: read
12 pages: write
13 id-token: write
15# Allow one concurrent deployment
16concurrency:
17 group: 'pages'
18 cancel-in-progress: true
20jobs:
21 # Single deploy job since we're just deploying
22 deploy:
23 environment:
24 name: github-pages
25 url: ${{ steps.deployment.outputs.page_url }}
26 runs-on: ubuntu-latest
27 steps:
28 - name: Checkout
29 uses: actions/checkout@v4
30 - name: Set up Node
31 uses: actions/setup-node@v4
32 with:
33 node-version: 20
34 cache: 'npm'
35 cache-dependency-path: './web-ui/package-lock.json'
36 - name: Install dependencies
37 run: cd web-ui && npm install
38 - name: Build
39 run: cd web-ui && npm run build
40 - name: Setup Pages
41 uses: actions/configure-pages@v4
42 - name: Upload artifact
43 uses: actions/upload-pages-artifact@v3
44 with:
45 # Upload dist folder
46 path: './web-ui/dist'
47 - name: Deploy to GitHub Pages
48 id: deployment
49 uses: actions/deploy-pages@v4
moveopenescclose