Docs: Revamp extensions site (#1260)
Co-authored-by: Nahiyan Khan <nahiyan@squareup.com>
This commit is contained in:
@@ -9,7 +9,6 @@ on:
|
||||
- closed
|
||||
paths:
|
||||
- 'documentation/**'
|
||||
- 'extensions-site/**'
|
||||
|
||||
concurrency: preview-${{ github.ref }}
|
||||
|
||||
@@ -21,8 +20,8 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
if: github.event.action != 'closed'
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
@@ -38,24 +37,8 @@ jobs:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Install dependencies and build extensions-site
|
||||
working-directory: ./extensions-site
|
||||
env:
|
||||
VITE_BASENAME: "/goose/pr-preview/pr-${{ github.event.number }}/v1/extensions/" # Set the base URL here for the extensions site
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Combine builds into one directory
|
||||
if: github.event.action != 'closed'
|
||||
run: |
|
||||
mkdir combined-build
|
||||
cp -r documentation/build/* combined-build/
|
||||
mkdir -p combined-build/v1/extensions
|
||||
cp -r extensions-site/build/client/* combined-build/v1/extensions/
|
||||
|
||||
- name: Deploy preview
|
||||
uses: rossjrw/pr-preview-action@v1
|
||||
if: ${{ github.event.pull_request.head.repo.full_name == 'block/goose' }}
|
||||
with:
|
||||
source-dir: combined-build
|
||||
source-dir: documentation/build
|
||||
|
||||
Reference in New Issue
Block a user