mirror of
https://github.com/aljazceru/goose.git
synced 2026-02-11 09:34:30 +01:00
Improve docs & extensions deploy workflow (#996)
This commit is contained in:
24
.github/workflows/deploy-docs-and-extensions.yml
vendored
24
.github/workflows/deploy-docs-and-extensions.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user