Skip to content

Commit fa00929

Browse files
committed
ci: update github workflows deploy
1 parent aeaeea9 commit fa00929

File tree

1 file changed

+9
-39
lines changed

1 file changed

+9
-39
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Github Pages Astro CI
1+
name: Deploy to GitHub Pages
22

33
on:
44
# Trigger the workflow every time you push to the `main` branch
@@ -19,43 +19,13 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout your repository using git
22-
uses: actions/checkout@v3
23-
- name: Install Node.js
24-
uses: actions/setup-node@v3
25-
with:
26-
node-version: 18
27-
28-
- uses: pnpm/action-setup@v2
29-
name: Install pnpm
30-
id: pnpm-install
31-
with:
32-
version: latest
33-
run_install: false
34-
35-
- name: Get pnpm store directory
36-
id: pnpm-cache
37-
shell: bash
38-
run: |
39-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
40-
41-
- uses: actions/cache@v3
42-
name: Setup pnpm cache
43-
with:
44-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
45-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
46-
restore-keys: |
47-
${{ runner.os }}-pnpm-store-
48-
49-
- name: Install dependencies
50-
run: pnpm install
51-
52-
- name: Build Astro project
53-
run: pnpm run build
54-
55-
- name: Upload Pages Artifact
56-
uses: actions/upload-pages-artifact@v1
57-
with:
58-
path: "./dist/"
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
25+
# with:
26+
# path: . # The root location of your Astro project inside the repository. (optional)
27+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (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)
5929

6030
deploy:
6131
needs: build
@@ -66,4 +36,4 @@ jobs:
6636
steps:
6737
- name: Deploy to GitHub Pages
6838
id: deployment
69-
uses: actions/deploy-pages@v1
39+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)