Skip to content

Commit

Permalink
Add explainer
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Mar 28, 2024
1 parent 336565c commit 7e797d9
Show file tree
Hide file tree
Showing 11 changed files with 453 additions and 118 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
index.html -diff merge=ours
spec.js -diff merge=ours
spec.css -diff merge=ours
31 changes: 20 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
name: Build spec

on: [pull_request, push]

name: Publish Spec to gh-pages
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: lts/*
- run: npm run build
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
skip-install: true
skip-ls-check: true
node-version: lts/*
- run: npm install --legacy-peer-deps
- run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: build
clean-exclude: |
pr
23 changes: 0 additions & 23 deletions .github/workflows/deploy.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish PR to gh-pages/pr/
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.number }}
steps:
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
skip-install: true
skip-ls-check: true
node-version: lts/*
- run: npm install --legacy-peer-deps
- run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: build
target-folder: pr/${{ github.event.number }}/
- id: get-preview-url
name: Get preview url
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
url=(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')
echo "preview-url=https://tc39.es/$(basename $GITHUB_REPOSITORY)pr/${{ github.event.number }}" >> "$GITHUB_OUTPUT"
shell: bash
- name: Post Preview Comment
uses: phulsechinmay/rewritable-pr-comment@v0.3.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_IDENTIFIER: tc39_pr_preview_comment
message: |
A preview of this PR can be found at ${{ steps.get-preview-url.outputs.preview-url }}.
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"rbuckton.grammarkdown-vscode",
"rbuckton.ecmarkup-vscode"
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"[markdown]": {
"files.trimTrailingWhitespace": false
},
"[html]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[ecmarkup]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"files.associations": {
// "*.html": "ecmarkup",
"*.emu": "ecmarkup"
}
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "gulp",
"task": "default",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Loading

0 comments on commit 7e797d9

Please sign in to comment.