Skip to content

Commit 4091ee6

Browse files
committed
Meta: Publish the rendered spec for PRs
1 parent d96dae0 commit 4091ee6

File tree

4 files changed

+50
-38
lines changed

4 files changed

+50
-38
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/publish-main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: '[node LTS] npm install'
13+
uses: ljharb/actions/node/install@main
14+
with:
15+
node-version: lts/*
16+
- run: npm run build
17+
- name: publish to gh-pages
18+
uses: JamesIves/[email protected]
19+
with:
20+
branch: gh-pages
21+
folder: build
22+
clean-exclude: |
23+
pr

.github/workflows/publish-pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish PR
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
if: ${{ github.event.pull_request }}
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: '[node LTS] npm install'
12+
uses: ljharb/actions/node/install@main
13+
with:
14+
node-version: lts/*
15+
- 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 }}.

0 commit comments

Comments
 (0)