Skip to content

Commit d25cf17

Browse files
authored
Merge pull request #1 from ringoldsdev/astro
chore: add build script
2 parents 6625c17 + 13a6a02 commit d25cf17

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/build.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "master" branch
8+
push:
9+
branches: [ "master" ]
10+
pull_request:
11+
branches: [ "master" ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
jobs:
16+
build_deploy:
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: actions/checkout@master
20+
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: 24
24+
25+
- uses: pnpm/action-setup@v2
26+
name: Install pnpm
27+
id: pnpm-install
28+
with:
29+
version: 10
30+
run_install: false
31+
32+
- name: Get pnpm store directory
33+
id: pnpm-cache
34+
shell: bash
35+
run: |
36+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
37+
38+
- uses: actions/cache@v4
39+
name: Setup pnpm cache
40+
with:
41+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
46+
- name: Install dependencies
47+
run: pnpm install
48+
49+
- name: Generate static site
50+
run: pnpm build
51+
52+
- name: Deploy
53+
uses: peaceiris/actions-gh-pages@v3
54+
with:
55+
publish_dir: dist
56+
publish_branch: gh-pages
57+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)