mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-30 18:22:52 +08:00
chore: build dev branch docs as well
This commit is contained in:
parent
f3a2aa987b
commit
8ead8bd8c5
25
.github/workflows/build-test-docs.yml
vendored
25
.github/workflows/build-test-docs.yml
vendored
@ -3,6 +3,19 @@
|
||||
on:
|
||||
pull_request:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'commit to build'
|
||||
type: string
|
||||
required: false
|
||||
path:
|
||||
description: 'path within the docs pages to build to'
|
||||
type: string
|
||||
required: false
|
||||
artifact:
|
||||
description: 'artifact name to write'
|
||||
type: string
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
@ -13,6 +26,11 @@ jobs:
|
||||
with:
|
||||
node-version: 18
|
||||
- uses: actions/checkout@v3 # check out this repo
|
||||
if: ${{ !inputs.ref }}
|
||||
- uses: actions/checkout@v3 # check out the repo we're building docs for
|
||||
if: ${{ inputs.ref }}
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: bdunderscore/modular-avatar-images
|
||||
@ -38,15 +56,20 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Set baseUri
|
||||
if: ${{ inputs.path }}
|
||||
run: |
|
||||
BASEURL="/${{ inputs.path }}/" perl -i -e "s{baseUrl: '/'}{$ENV{BASEURL}}e" docs/docusaurus.config.js
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd docs
|
||||
yarn install --immutable
|
||||
yarn build
|
||||
ls -lR build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docs
|
||||
name: ${{ inputs.artifact || 'docs' }}
|
||||
path: docs/build
|
23
.github/workflows/deploy-pages.yml
vendored
23
.github/workflows/deploy-pages.yml
vendored
@ -2,7 +2,9 @@ name: Deploy documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- ci
|
||||
- main
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@ -17,10 +19,19 @@ concurrency:
|
||||
jobs:
|
||||
build-docs:
|
||||
name: Build documentation
|
||||
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@main
|
||||
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@ci
|
||||
build-docs-dev:
|
||||
name: Build documentation (dev branch)
|
||||
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@ci
|
||||
with:
|
||||
ref: dev
|
||||
path: dev
|
||||
artifact: docs-dev
|
||||
deploy-docs:
|
||||
name: Deploy documentation
|
||||
needs: build-docs
|
||||
needs:
|
||||
- build-docs
|
||||
- build-docs-dev
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
@ -32,6 +43,14 @@ jobs:
|
||||
with:
|
||||
name: docs
|
||||
path: docs/build
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docs-dev
|
||||
path: docs/build/dev
|
||||
- name: test
|
||||
run: |
|
||||
ls -lR docs/build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
|
2
.github/workflows/gameci.yml
vendored
2
.github/workflows/gameci.yml
vendored
@ -26,7 +26,7 @@ name: GameCI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, dev, ci]
|
||||
branches: [master, dev]
|
||||
# This is a bit of a radioactive event; we need to be very careful with what permissions
|
||||
# we assign this action, as we're allowing arbitrary code execution with the context of
|
||||
# whatever permissions we assign.
|
||||
|
Loading…
Reference in New Issue
Block a user