Skip to content

Commit 0c863e6

Browse files
committed
fix(deploy): use PNPM cache instead
1 parent 00dcd46 commit 0c863e6

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

.github/workflows/deploy.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,67 @@
1-
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2-
#
3-
name: Deploy VitePress site to Pages
1+
name: Deploy to Github Pages
42

53
on:
6-
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7-
# using the `master` branch as the default branch.
84
push:
95
branches: [main]
106

11-
# Allows you to run this workflow manually from the Actions tab
7+
# allows you to run this workflow manually from the Actions tab
128
workflow_dispatch:
139

14-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
# sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1511
permissions:
1612
contents: read
1713
pages: write
1814
id-token: write
1915

20-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2216
concurrency:
2317
group: pages
2418
cancel-in-progress: false
2519

2620
jobs:
27-
# Build job
2821
build:
2922
runs-on: ubuntu-latest
3023
steps:
3124
- name: Checkout
3225
uses: actions/checkout@v4
3326
with:
34-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
27+
fetch-depth: 0 # not needed if lastUpdated is not enabled
3528
submodules: true
36-
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
37-
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
29+
30+
- uses: pnpm/action-setup@v4
31+
name: Install pnpm
32+
with:
33+
version: 10
34+
run_install: false
35+
3836
- name: Setup Node
3937
uses: actions/setup-node@v4
4038
with:
41-
node-version: 18
42-
cache: npm # or pnpm / yarn
39+
node-version: 20
40+
cache: pnpm
41+
4342
- name: Setup Pages
4443
uses: actions/configure-pages@v4
44+
4545
- name: Install dependencies
46-
run: npm ci # or pnpm install / yarn install / bun install
46+
run: pnpm install
47+
4748
- name: Build with VitePress
4849
run: |
4950
npx vitepress build
5051
touch .vitepress/dist/.nojekyll
52+
5153
- name: Upload artifact
5254
uses: actions/upload-pages-artifact@v3
5355
with:
5456
path: .vitepress/dist
5557

56-
# Deploy job
5758
deploy:
5859
needs: build
5960
environment:
6061
name: github-pages
6162
url: ${{ steps.deployment.outputs.page_url }}
6263
runs-on: ubuntu-latest
63-
name: Deploy
64+
6465
steps:
6566
- name: Deploy to GitHub Pages
6667
id: deployment

0 commit comments

Comments
 (0)