Skip to content

Commit d5537df

Browse files
Merge pull request #3 from no-witness-labs/fix/docs-deploy
docs: deploy
2 parents 6706e9c + 7d75a56 commit d5537df

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

.github/workflows/docs.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ name: Deploy Documentation
22

33
on:
44
push:
5-
branches: [main]
6-
paths:
7-
- 'docs/**'
8-
- 'packages/evolution/src/**'
9-
- 'packages/evolution/docs/**'
5+
branches: ["main"]
106
workflow_dispatch:
117

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
138
permissions:
149
contents: read
1510
pages: write
@@ -25,30 +20,36 @@ jobs:
2520
# Build job
2621
build:
2722
runs-on: ubuntu-latest
23+
2824
steps:
2925
- name: ⬇️ Checkout
3026
uses: actions/checkout@v4
3127

32-
- name: Install pnpm
33-
uses: pnpm/action-setup@v4
34-
35-
- name: ⎔ Setup Node.js
28+
- name: ⎔ Install Node.js
3629
uses: actions/setup-node@v4
3730
with:
3831
node-version: 20
39-
cache: 'pnpm'
4032

41-
- name: 🔧 Setup Pages
42-
uses: actions/configure-pages@v4
33+
- name: 📦 Install pnpm
34+
uses: pnpm/action-setup@v4
4335
with:
44-
# Automatically inject basePath in your Next.js configuration file and disable
45-
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
46-
#
47-
# You may remove this line if you want to manage the configuration yourself.
48-
static_site_generator: next
36+
run_install: false
37+
38+
- name: Get pnpm store directory
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
43+
- name: Setup pnpm cache
44+
uses: actions/cache@v4
45+
with:
46+
path: ${{ env.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-pnpm-store-
4950
5051
- name: 📦 Install dependencies
51-
run: pnpm install --frozen-lockfile
52+
run: pnpm install
5253

5354
- name: 🏗 Build packages (required for docs)
5455
run: pnpm turbo run build
@@ -61,14 +62,15 @@ jobs:
6162
run: node scripts/copy-evolution-docs.mjs
6263
working-directory: docs
6364

64-
- name: 🏗 Build documentation with Next.js
65-
run: pnpm turbo run build
66-
working-directory: docs
65+
- name: 🏗 Build documentation
66+
run: |
67+
cd docs
68+
pnpm build
6769
6870
- name: 📤 Upload artifact
6971
uses: actions/upload-pages-artifact@v3
7072
with:
71-
path: ./docs/out
73+
path: docs/out
7274

7375
# Deployment job
7476
deploy:

0 commit comments

Comments
 (0)