-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95a55b1
commit bf0c584
Showing
6 changed files
with
165 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Publish to npm | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build docs | ||
run: pnpm run docs | ||
|
||
- name: Archive artifact | ||
shell: sh | ||
run: | | ||
echo ::group::Archive artifact | ||
tar \ | ||
--dereference --hard-dereference \ | ||
--directory "./docs" \ | ||
-cvf "$RUNNER_TEMP/github-pages.tar" \ | ||
--exclude=.git \ | ||
--exclude=.github \ | ||
. | ||
echo ::endgroup:: | ||
- name: Upload artifact | ||
id: upload-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: github-pages | ||
path: ${{ runner.temp }}/github-pages.tar | ||
if-no-files-found: error | ||
|
||
|
||
# Deploy job | ||
deploy: | ||
# Add a dependency to the build job | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# Specify runner + deployment step | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,3 +216,5 @@ $RECYCLE.BIN/ | |
*.lnk | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/node,macos,windows,linux | ||
|
||
docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters