Skip to content

Commit 723c20a

Browse files
committed
Meta: Publish the rendered spec for PRs
1 parent d96dae0 commit 723c20a

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
name: Build spec
1+
name: Publish PR
22

3-
on: [pull_request, push]
3+
on: [pull_request]
44

55
jobs:
6-
build:
6+
publish:
77
runs-on: ubuntu-latest
8-
8+
if: ${{ github.event.pull_request }}
99
steps:
1010
- uses: actions/checkout@v3
11-
- uses: ljharb/actions/node/install@main
12-
name: 'nvm install lts/* && npm install'
11+
- name: '[node LTS] npm install'
12+
uses: ljharb/actions/node/install@main
1313
with:
1414
node-version: lts/*
1515
- run: npm run build
16+
- name: publish to gh-pages
17+
uses: JamesIves/[email protected]
18+
with:
19+
branch: gh-pages
20+
folder: build
21+
target-folder: pr/${{ github.event.number }}
22+
- name: provide comment
23+
uses: phulsechinmay/[email protected]
24+
with:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
message: |
27+
The rendered spec for this PR is available at https://tc39.es/${{ github.event.pull_request.base.repo.name }}/pr/${{ github.event.number }}.

.github/workflows/deploy.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: Deploy gh-pages
1+
name: Publish
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76

87
jobs:
9-
deploy:
8+
publish:
109
runs-on: ubuntu-latest
11-
1210
steps:
1311
- uses: actions/checkout@v3
14-
- uses: ljharb/actions/node/install@main
15-
name: 'nvm install lts/* && npm install'
12+
- name: '[node LTS] npm install'
13+
uses: ljharb/actions/node/install@main
1614
with:
1715
node-version: lts/*
1816
- run: npm run build
19-
- uses: JamesIves/[email protected]
17+
- name: publish to gh-pages
18+
uses: JamesIves/[email protected]
2019
with:
2120
branch: gh-pages
2221
folder: build
23-
clean: true
22+
clean-exclude: |
23+
pr

0 commit comments

Comments
 (0)