Skip to content

Commit 745a4bf

Browse files
Extend PR workflow with preview deployment to staging environment
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
1 parent 51fdc10 commit 745a4bf

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/build-check.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ on:
44
pull_request:
55
branches: [main]
66

7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: preview-${{ github.event.pull_request.number }}
14+
cancel-in-progress: true
15+
716
jobs:
817
build:
918
runs-on: ubuntu-latest
@@ -22,3 +31,21 @@ jobs:
2231

2332
- name: Fetch samples & Build
2433
run: npm run build
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v4
37+
with:
38+
path: dist
39+
40+
deploy-preview:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
environment:
44+
name: github-pages-preview
45+
url: ${{ steps.deployment.outputs.deployment_url }}
46+
steps:
47+
- name: Deploy preview to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4
50+
with:
51+
preview: true

0 commit comments

Comments
 (0)