Skip to content

Commit

Permalink
Update docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomano authored Dec 11, 2024
1 parent 0c21908 commit 37b3ee9
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,42 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
fetch-depth: 2

version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
node-version: "20"
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-
- name: Install dependencies
run: |
cd docs
pnpm install
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with VitePress
- name: Build site with Next.js
run: |
cd docs
pnpm run build
touch out/.nojekyll
- name: Upload Artifact
pnpm build
touch out/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out
Expand Down

0 comments on commit 37b3ee9

Please sign in to comment.