Skip to content

Commit d25c019

Browse files
committed
Add gh pages workflow
1 parent e3d1a33 commit d25c019

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/gh-deployment.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deployment to GitHub Pages
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
# call this workflow when the workflow Main Validation is completed after a push to main
8+
workflow_run:
9+
workflows:
10+
- 'Continuous Integration'
11+
branches:
12+
- main
13+
types:
14+
- completed
15+
16+
jobs:
17+
deploy:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Begin CI...
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version-file: .node-version
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Build page
33+
run: npm run build
34+
35+
- name: Deploy to gh-pages
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./dist

0 commit comments

Comments
 (0)