Skip to content

Commit fec0856

Browse files
authored
ci: add deployment workflow
1 parent 298b433 commit fec0856

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deploy.outputs.page_url }}
22+
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Build Astro site
37+
run: npm run build
38+
39+
- name: Upload Pages artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: ./dist
43+
44+
- name: Deploy to GitHub Pages
45+
id: deploy
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)