Skip to content

Commit

Permalink
Merge pull request #554 from hildjj/fix-552
Browse files Browse the repository at this point in the history
Update publish workflow.
  • Loading branch information
hildjj authored Sep 30, 2024
2 parents 85f1d79 + 652b92b commit 4e72c49
Show file tree
Hide file tree
Showing 9 changed files with 450 additions and 8,724 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
description: Which branch to deploy to peggyjs.org
required: true
options:
- main
- stable

jobs:
Expand All @@ -26,7 +27,7 @@ jobs:
cache: pnpm
- name: Install dependencies
working-directory: docs
run: "pnpm i --frozen-lockfile"
run: "pnpm install"
- name: Build
working-directory: docs
run: "npm run build"
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for publishing docs
id-token: write # Needed for creating provenance attestation
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm i -r
- run: npm run build
- run: npm run docs
- run: npm pkg delete devDependencies scripts
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
publish_branch: docs
- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ browser/
build/
coverage/
docs/_site
docs/js/*-bundle.min.js
docs/vendor/peggy/
examples/*.js
node_modules/
yarn.lock
8 changes: 0 additions & 8 deletions docs/js/benchmark-bundle.min.js

This file was deleted.

8 changes: 0 additions & 8 deletions docs/js/test-bundle.min.js

This file was deleted.

8 changes: 0 additions & 8 deletions docs/vendor/peggy/peggy.min.js

This file was deleted.

Loading

0 comments on commit 4e72c49

Please sign in to comment.