Skip to content

Commit abf5964

Browse files
committed
cicd: deploy
1 parent 9c240da commit abf5964

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/pages.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Astro site to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- feat/astro-starlight
7+
workflow_dispatch:
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
env:
20+
BUILD_PATH: "."
21+
22+
jobs:
23+
build:
24+
name: Build
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: "22"
33+
cache: ${{ steps.detect-package-manager.outputs.manager }}
34+
cache-dependency-path: ./${{ steps.detect-package-manager.outputs.lockfile }}
35+
- name: Setup Pages
36+
id: pages
37+
uses: actions/configure-pages@v5
38+
- name: Install dependencies
39+
run: npm ci
40+
- name: Build with Astro
41+
run: npm run build
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ./dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
needs: build
52+
runs-on: ubuntu-latest
53+
name: Deploy
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)