forked from chilli-axe/mpc-autofill
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (64 loc) · 2.28 KB
/
Copy pathdeploy-frontend.yml
File metadata and controls
75 lines (64 loc) · 2.28 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
74
75
name: Deploy frontend to GitHub Pages
# docs/** and the publish map trigger this too: a step below runs
# .github/scripts/publish_site.py (Python - the single owner of ALL
# link-rewrite/extraction logic, see docs/proposals/proposal-i-docs-as-
# site-source.md) BEFORE `npm run build`, writing pre-transformed markdown
# for every "site"-targeted docs/ page into frontend/generated-docs/ for
# src/pages/guide/[[...slug]].tsx to read at build time. Without this
# trigger, a docs/-only PR would regenerate the wiki (docs-wiki-
# publish.yml) while the site silently stayed stale.
on:
push:
branches: [master]
paths:
- "frontend/**"
- "docs/**"
- ".github/wiki-publish-map.json"
- ".github/scripts/publish_wiki.py"
- ".github/scripts/publish_site.py"
- ".github/workflows/deploy-frontend.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.15
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Emit site docs from docs/ (single-transform Python pipeline)
working-directory: .
run: python3 .github/scripts/publish_site.py . frontend/generated-docs
- run: npm ci
- run: npm run build
env:
NEXT_PUBLIC_BACKEND_URL: https://api.proxyprints.ca
NEXT_PUBLIC_IMAGE_WORKER_URL: https://cdn.proxyprints.ca
NEXT_PUBLIC_IMAGE_BUCKET_URL: https://img.proxyprints.ca
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID }}
NEXT_PUBLIC_GOOGLE_DRIVE_APP_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_DRIVE_APP_ID }}
NEXT_PUBLIC_UNIFIED_DISPLAY_ENABLED: ${{ vars.NEXT_PUBLIC_UNIFIED_DISPLAY_ENABLED }}
- uses: actions/upload-pages-artifact@v3
with:
path: frontend/out
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4