-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.87 KB
/
Copy pathpages.yml
File metadata and controls
73 lines (60 loc) · 1.87 KB
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
name: Deploy Component Lab to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build component-lab
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0 # v6.0.3
with:
token: ${{ secrets.GH_PAT != '' && secrets.GH_PAT || github.token }}
persist-credentials: false
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build packages (react-uswds + gov-components + react-ontario)
run: npm run build
- name: Build component-lab
env:
COMPONENT_LAB_BASE: /gps-design-systems-react/
run: npm run build --workspace=apps/component-lab
- name: Build ontario-lab
env:
ONTARIO_LAB_BASE: /gps-design-systems-react/ontario-lab/
run: npm run build --workspace=apps/ontario-lab
- name: Merge sites into a single artifact
run: |
mkdir -p _site
cp -r apps/component-lab/dist/. _site/
mkdir -p _site/ontario-lab
cp -r apps/ontario-lab/dist/. _site/ontario-lab/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: _site
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy
id: deploy
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4