Debian Codegraph @

intents/.github/workflows/gh-pages.yml

raw symbols SCIP
1 name: Deploy to GitHub Pages
2
3 env:
4 NODE_VERSION: 16
5
6 on:
7 push:
8 branches: ["main"]
9
10 workflow_dispatch:
11
12 # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13 permissions:
14 contents: read
15 pages: write
16 id-token: write
17
18 # Allow one concurrent deployment
19 concurrency:
20 group: "pages"
21 cancel-in-progress: true
22
23 jobs:
24 # Build job
25 build:
26 runs-on: ubuntu-latest
27 if: ${{ github.repository == 'OHF-voice/intents' }}
28 steps:
29 - name: Checkout
30 uses: actions/checkout@v6
31 - name: Setup Pages
32 uses: actions/configure-pages@v5
33 - name: Set up Node ${{ env.NODE_VERSION }}
34 uses: actions/[email protected]
35 with:
36 node-version: ${{ env.NODE_VERSION }}
37 - uses: actions/setup-python@v6
38 with:
39 python-version: "3.12"
40 cache: "pip"
41 - name: Install Python dependencies
42 run: script/setup
43 - name: Install JavaScript dependencies
44 run: cd website && npm ci
45 - name: Build site
46 run: website/script/build
47 - name: Write language scores
48 run: |
49 python3 script/write_language_scores.py > website/dist/language_scores.json
50 - name: Upload artifact
51 uses: actions/[email protected]
52 with:
53 path: website/dist
54
55 # Deployment job
56 deploy:
57 environment:
58 name: github-pages
59 url: ${{ steps.deployment.outputs.page_url }}
60 runs-on: ubuntu-latest
61 needs: build
62 steps:
63 - name: Deploy to GitHub Pages
64 id: deployment
65 uses: actions/[email protected]