Skip to content

Commit 3cf557a

Browse files
committed
added deployment yaml
1 parent e514943 commit 3cf557a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/deploy.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# https://github.com/actions/deploy-pages#usage
2+
name: Deploy to GitHub Pages
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: corepack enable
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: "18"
19+
20+
- run: npx nypm install
21+
- run: npm run build
22+
env:
23+
NITRO_PRESET: github_pages
24+
25+
- name: Upload artifact
26+
uses: actions/upload-pages-artifact@v1
27+
with:
28+
path: ./.output/public
29+
30+
# Deployment job
31+
deploy:
32+
# Add a dependency to the build job
33+
needs: build
34+
35+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
36+
permissions:
37+
pages: write # to deploy to Pages
38+
id-token: write # to verify the deployment originates from an appropriate source
39+
40+
# Deploy to the github_pages environment
41+
environment:
42+
name: github_pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
45+
# Specify runner + deployment step
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)