Skip to content

Commit c3f7b28

Browse files
committed
Add spec-prod to deploy workflow; add PR validation workflow
1 parent 4012a71 commit c3f7b28

File tree

2 files changed

+56
-11
lines changed

2 files changed

+56
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ jobs:
1111

1212
permissions:
1313
contents: write
14-
pages: write
15-
id-token: write
16-
17-
environment:
18-
name: github-pages
1914

2015
steps:
2116
# Checkout repository
@@ -43,13 +38,36 @@ jobs:
4338
uses: stefanzweifel/git-auto-commit-action@v5
4439
with:
4540
commit_message: Add generated index.html
41+
42+
- name: Run spec-prod
43+
uses: w3c/spec-prod@v2
4644

47-
# Upload artifacts
48-
- name: Upload artifacts
49-
uses: actions/upload-pages-artifact@v3
45+
upload:
46+
runs-on: ubuntu-latest
47+
needs: build
48+
49+
steps:
50+
- name: Download spec-prod artifact
51+
uses: actions/download-artifact@v4
5052
with:
51-
path: ./
53+
name: spec-prod-result
54+
path: _site
55+
56+
- name: Upload Pages artifact
57+
uses: actions/upload-pages-artifact@v3
5258

53-
# Deploy to GitHub Pages
59+
deploy:
60+
runs-on: ubuntu-latest
61+
needs: upload
62+
63+
permissions:
64+
pages: write
65+
id-token: write
66+
67+
environment:
68+
name: github-pages
69+
url: ${{ steps.deployment.outputs.page_url }}
70+
71+
steps:
5472
- name: Deploy to GitHub Pages
55-
uses: actions/deploy-pages@v4
73+
uses: actions/deploy-pages@v4

.github/workflows/pr-validate.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Validation
2+
3+
on: pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Node
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
18+
- name: Install Node dependencies and run script
19+
run: |
20+
npm install
21+
22+
- name: Run Node script
23+
run: |
24+
node matf.js
25+
26+
- name: Run spec-prod
27+
uses: w3c/spec-prod@v2

0 commit comments

Comments
 (0)