Skip to content

Commit 4d78323

Browse files
committed
feat: add github actions
1 parent ed2a362 commit 4d78323

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [ main ]
8+
9+
# Allows you to run this workflow manually from the Actions tab on GitHub.
10+
workflow_dispatch:
11+
12+
# Allow this job to clone the repo and create a page deployment
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout your repository using git
23+
uses: actions/checkout@v3
24+
- name: Install, build, and upload your site
25+
uses: withastro/action@v1
26+
with:
27+
node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
28+
package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
29+
30+
deploy:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)