Skip to content

Commit 7836a52

Browse files
authored
add deploy job
1 parent 3a4963b commit 7836a52

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,35 @@ jobs:
2424
node-version: '18.x'
2525
- run: npm install
2626
- run: npm test
27+
deploy:
28+
needs: test
29+
permissions:
30+
contents: write
31+
pages: write
32+
id-token: write
33+
environment:
34+
name: production
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: checkout repo
39+
uses: actions/checkout@v3
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
- name: use node.js
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: '18.x'
46+
- name: configure github pages
47+
uses: actions/configure-pages@v3
48+
with:
49+
static_site_generator: next
50+
- run: npm install
51+
- run: npm run build
52+
- name: upload artifacts
53+
uses: actions/upload-pages-artifact@v1
54+
with:
55+
path: "./out"
56+
- name: deploy
57+
id: deployment
58+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)