Repository navigation
47 lines (42 loc) · 1.95 KB
/
Copy pathpages.yml
File metadata and controls
47 lines (42 loc) · 1.95 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
name: Pages
# Deploys the web app (packages/targets/graph-web) to GitHub Pages as a project site, https://exadev.github.io/process-graph/. The repository's Pages source must be set to "GitHub Actions" once (`gh api repos/ExaDev/process-graph/pages -X POST -f build_type=workflow`); until it is, the deploy job fails at the deployment step.
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The app's base path is the repository name, so the build serves under /process-graph/ and its manifest scope, service worker scope and asset URLs all follow it. GRAPH_WEB_BASE is read by vite.config.ts and declared in the _build task's env so turbo passes it through and keys its cache on it.
- uses: ./.github/actions/setup-workspace
with:
task: pages
command: GRAPH_WEB_BASE="/${GITHUB_REPOSITORY#*/}/" pnpm exec turbo run _build --filter=@exadev/process-graph-web
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: packages/targets/graph-web/dist
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
# Two deploys never overlap and a running one is never cancelled: a cancelled deployment can leave the site half-published, so the next run queues behind it.
concurrency:
group: pages
cancel-in-progress: false
permissions:
pages: write # to publish the artifact
id-token: write # OIDC proof to the Pages service that the deploy comes from this workflow
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1