Improve docs & extensions deploy workflow (#996)
This commit is contained in:
@@ -4,6 +4,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'documentation/**'
|
||||||
|
- 'extensions-site/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@@ -18,6 +23,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
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
|
- name: Install dependencies and build docs
|
||||||
working-directory: ./documentation
|
working-directory: ./documentation
|
||||||
env:
|
env:
|
||||||
@@ -28,6 +41,14 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
npm run build
|
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
|
- name: Install dependencies and build extensions-site
|
||||||
working-directory: ./extensions-site
|
working-directory: ./extensions-site
|
||||||
env:
|
env:
|
||||||
@@ -44,9 +65,8 @@ jobs:
|
|||||||
cp -r extensions-site/build/client/* combined-build/v1/extensions/
|
cp -r extensions-site/build/client/* combined-build/v1/extensions/
|
||||||
|
|
||||||
- name: Deploy to /gh-pages
|
- name: Deploy to /gh-pages
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: combined-build
|
publish_dir: combined-build
|
||||||
destination_dir: . # Deploy the site to the root /goose directory
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user