Improve docs & extensions deploy workflow (#996)

This commit is contained in:
Adewale Abati
2025-02-03 01:31:27 +01:00
committed by GitHub
parent 357bd01ea4
commit 1960bb7b2f

View File

@@ -4,6 +4,11 @@ on:
push:
branches:
- main
pull_request:
paths:
- 'documentation/**'
- 'extensions-site/**'
jobs:
deploy:
@@ -18,6 +23,14 @@ jobs:
with:
node-version: 20
- name: Cache Node.js modules (documentation)
uses: actions/cache@v3
with:
path: ./documentation/node_modules
key: ${{ runner.os }}-documentation-${{ hashFiles('./documentation/package-lock.json') }}
restore-keys: |
${{ runner.os }}-documentation-
- name: Install dependencies and build docs
working-directory: ./documentation
env:
@@ -28,6 +41,14 @@ jobs:
npm install
npm run build
- name: Cache Node.js modules (extensions-site)
uses: actions/cache@v3
with:
path: ./extensions-site/node_modules
key: ${{ runner.os }}-extensions-${{ hashFiles('./extensions-site/package-lock.json') }}
restore-keys: |
${{ runner.os }}-extensions-
- name: Install dependencies and build extensions-site
working-directory: ./extensions-site
env:
@@ -44,9 +65,8 @@ jobs:
cp -r extensions-site/build/client/* combined-build/v1/extensions/
- name: Deploy to /gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: combined-build
destination_dir: . # Deploy the site to the root /goose directory