Skip to content

Commit e24f371

Browse files
authored
chore(ci): split demo.yml into build + deploy jobs (#127)
Splits the single build-and-deploy job into the canonical GitHub Pages 2-job pattern: build (no `id-token`) → deploy (only `id-token: write`, runs deploy-pages only). Resolves the supply-chain audit's OIDC-fused finding on this workflow.
1 parent e8fe76d commit e24f371

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/demo.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77

88
permissions:
99
contents: read
10-
pages: write
11-
id-token: write
1210

1311
jobs:
1412
build:
@@ -41,6 +39,20 @@ jobs:
4139
with:
4240
path: './demo/dist'
4341

42+
deploy:
43+
name: 🚀 Deploy
44+
needs: build
45+
runs-on: ubuntu-latest
46+
47+
permissions:
48+
pages: write
49+
id-token: write
50+
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
55+
steps:
4456
- name: 🚀 Deploy to GitHub Pages
4557
id: deployment
4658
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

0 commit comments

Comments
 (0)