Skip to content

Commit e23a3b0

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

File tree

4 files changed

+54
-38
lines changed

4 files changed

+54
-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: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish PR
2+
3+
on: [pull_request]
4+
5+
permissions:
6+
contents: write
7+
pages: write
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.pull_request }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: '[node LTS] npm install'
16+
uses: ljharb/actions/node/install@main
17+
with:
18+
node-version: lts/*
19+
- run: npm run build
20+
- name: publish to gh-pages
21+
uses: JamesIves/[email protected]
22+
with:
23+
branch: gh-pages
24+
folder: build
25+
target-folder: pr/${{ github.event.number }}
26+
- name: provide comment
27+
uses: phulsechinmay/[email protected]
28+
with:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
message: |
31+
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)