Skip to content

Commit daeff8d

Browse files
committed
add action
1 parent 8ef660c commit daeff8d

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
- github-pages
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+
# Pick your own package manager and build script
21+
- run: pnpm install
22+
- run: pnpm run build
23+
env:
24+
NITRO_PRESET: github_pages
25+
26+
- name: Upload artifact
27+
uses: actions/upload-pages-artifact@v1
28+
with:
29+
path: ./.output/public
30+
31+
# Deployment job
32+
deploy:
33+
# Add a dependency to the build job
34+
needs: build
35+
36+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+
permissions:
38+
pages: write # to deploy to Pages
39+
id-token: write # to verify the deployment originates from an appropriate source
40+
41+
# Deploy to the github_pages environment
42+
environment:
43+
name: github_pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
46+
# Specify runner + deployment step
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)