-
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (74 loc) · 1.92 KB
/
website.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: website
on:
push:
branches: [master]
paths: ['docs/www/**']
pull_request:
branches: [master]
types: [opened, synchronize]
paths: ['docs/www/**']
schedule:
- cron: '0 0 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-analyze:
defaults:
run:
working-directory: docs/www
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-node
uses: actions/setup-node@v4
with:
cache: npm
node-version: '20'
cache-dependency-path: docs/www/package-lock.json
- name: install-dependencies
run: npm ci --no-audit --no-fund --omit=optional
- name: setup-codeql
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
config: |
paths-ignore: [docs/www/build]
- name: build
run: npm run build
- name: analyze
uses: github/codeql-action/analyze@v3
- name: upload-artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v4
with:
name: build
path: docs/www/build
deploy:
if: ${{ github.event_name == 'push' }}
needs: [build-analyze]
environment:
name: ${{ github.workflow }}
url: ${{ steps.deploy.outputs.page_url }}
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- name: download-artifact
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: setup-page
uses: actions/configure-pages@v4
- name: upload-page
uses: actions/upload-pages-artifact@v3
with:
path: build
- name: deploy-page
id: deploy
uses: actions/deploy-pages@v4