-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add github-pages workflow #394
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,37 @@ | ||||||||
name: GitHub Pages | ||||||||
|
||||||||
on: | ||||||||
push: | ||||||||
branches: | ||||||||
- main | ||||||||
tags: | ||||||||
- 'v*.*.*' | ||||||||
- '!v*.*.*-*' | ||||||||
pull_request: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this means PRs run |
||||||||
|
||||||||
jobs: | ||||||||
deploy: | ||||||||
runs-on: ubuntu-22.04 | ||||||||
permissions: | ||||||||
contents: write | ||||||||
concurrency: | ||||||||
group: ${{ github.workflow }}-${{ github.ref }} | ||||||||
steps: | ||||||||
- uses: actions/checkout@v4 | ||||||||
|
||||||||
- name: Setup Node | ||||||||
uses: actions/setup-node@v4 | ||||||||
with: | ||||||||
node-version-file: '.nvmrc' | ||||||||
cache: 'yarn' | ||||||||
|
||||||||
- run: yarn install --frozen-lockfile # optional, --immutable | ||||||||
- run: yarn generate:docs | ||||||||
|
||||||||
- name: Deploy | ||||||||
uses: peaceiris/actions-gh-pages@v4 | ||||||||
# TODO: uncomment this before merge | ||||||||
# if: github.ref == 'refs/heads/main' | ||||||||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO - this will guard against whatever PRs deploying.
Suggested change
|
||||||||
with: | ||||||||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||
publish_dir: ./docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protect against deploying RC candidates like
v0.2.0-dev
orv0.2.0-2