Skip to content

Commit 14d0986

Browse files
Deploy github page workflow
1 parent 78b191e commit 14d0986

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish Jest Report
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout Repository
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '20.x'
35+
36+
- name: Install dependencies
37+
run: npm install
38+
39+
- name: Run Sanity Tests And Generate Report
40+
run: npm run test:sanity
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v3
44+
45+
- name: Download artifacts
46+
uses: actions/download-artifact@v4
47+
48+
- name: Upload Artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: test-results/report
52+
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.github/workflows/publish-report.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ jobs:
4949
url: ${{ steps.deployment.outputs.page_url }}
5050
runs-on: ubuntu-latest
5151
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Setup Pages
56+
uses: actions/configure-pages@v3
57+
5258
- name: Download artifacts
5359
uses: actions/download-artifact@v4
5460

0 commit comments

Comments
 (0)