-
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 gh pages workflow #2
base: main
Are you sure you want to change the base?
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,39 @@ | ||||||
name: Deployment to GitHub Pages | ||||||
|
||||||
permissions: | ||||||
contents: write | ||||||
|
||||||
on: | ||||||
# call this workflow when the workflow Main Validation is completed after a push to main | ||||||
workflow_run: | ||||||
workflows: | ||||||
- 'Continuous Integration' | ||||||
branches: | ||||||
- main | ||||||
types: | ||||||
- completed | ||||||
|
||||||
jobs: | ||||||
deploy: | ||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- name: Begin CI... | ||||||
uses: actions/checkout@v3 | ||||||
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.
Suggested change
|
||||||
|
||||||
- name: Set up Node | ||||||
uses: actions/setup-node@v3 | ||||||
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.
Suggested change
|
||||||
with: | ||||||
node-version-file: .node-version | ||||||
|
||||||
- name: Install dependencies | ||||||
run: npm install | ||||||
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.
Suggested change
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. you may need to use this action to install pnpm before using it 😊 https://github.com/pnpm/action-setup |
||||||
|
||||||
- name: Build page | ||||||
run: npm run build | ||||||
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.
Suggested change
|
||||||
|
||||||
- name: Deploy to gh-pages | ||||||
uses: peaceiris/actions-gh-pages@v3 | ||||||
with: | ||||||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||
publish_dir: ./dist |
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.
🔥