Skip to content

Commit

Permalink
GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Mar 3, 2025
1 parent 7207294 commit 24c6028
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 10 deletions.
52 changes: 44 additions & 8 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,50 @@ on:
branches-ignore:
- 'gh-pages'
jobs:
main:
name: Build, Validate and Deploy
build:
name: Build and Validate
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: w3c/spec-prod@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: npm ci
- run: node --run build
- uses: actions/upload-artifact@v4
with:
GH_PAGES_BRANCH: gh-pages
TOOLCHAIN: bikeshed
SOURCE: source-map.bs
DESTINATION: ${{ github.ref_name == 'main' && 'index.html' || format('{0}/index.html', github.ref_name) }}
path: out/

prepare-deploy:
name: Prepare Deploy
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/download-artifact@v4
if: success() || failure()
- run: cp -r ./out/. .
if: github.ref_name == 'main'
- run: mkdir -p pr && cp ./out ./pr/${{ github.ref_name }}
if: github.ref_name != 'main'
- run: rm -r out
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: .

deploy:
name: Deploy
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/ipr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'ecma-262'
name: IPR

on:
pull_request_target:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: node scripts/ipr-check.js tc39/ecma426 ${{ github.event.pull_request.head.sha || 'HEAD' }}
env:
Expand Down

0 comments on commit 24c6028

Please sign in to comment.