/ concept-collection / ephys_compression_tests
Sign in
concept-collection / ephys_compression_tests
ephys_compression_tests / .github / workflows / deploy-gh-pages.yml
61 lines · 1.3 KBBlameHistoryRaw
1name: Deploy to GitHub Pages
3on:
4 push:
5 branches: ['main']
6 paths:
7 - 'web-ui/**'
8 workflow_dispatch:
10# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
11permissions:
12 contents: read
13 pages: write
14 id-token: write
16# Allow one concurrent deployment
17concurrency:
18 group: 'pages'
19 cancel-in-progress: true
21jobs:
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
31 - name: Install pandoc and texlive
32 run: |
33 sudo apt-get update
34 sudo apt-get install -y pandoc texlive-latex-recommended
36 - name: Setup Node.js
37 uses: actions/setup-node@v3
38 with:
39 node-version: '20'
40 cache: 'npm'
41 cache-dependency-path: web-ui/package-lock.json
43 - name: Install dependencies
44 working-directory: web-ui
45 run: npm ci
47 - name: Build website
48 working-directory: web-ui
49 run: npm run build
51 - name: Setup Pages
52 uses: actions/configure-pages@v4
54 - name: Upload artifact
55 uses: actions/upload-pages-artifact@v3
56 with:
57 path: ./web-ui/dist
59 - name: Deploy to GitHub Pages
60 id: deployment
61 uses: actions/deploy-pages@v4
moveopenescclose