Skip to content

Commit

Permalink
Improve docs & extensions deploy workflow (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
acekyd authored Feb 3, 2025
1 parent 357bd01 commit 1960bb7
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/deploy-docs-and-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
branches:
- main

pull_request:
paths:
- 'documentation/**'
- 'extensions-site/**'

jobs:
deploy:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit 1960bb7

Please sign in to comment.