mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 12:15:05 +08:00
Refactor out docs building logic
This commit is contained in:
parent
ebabad6550
commit
08050f4021
17
.github/workflows/build-test-docs.yml
vendored
17
.github/workflows/build-test-docs.yml
vendored
@ -1,11 +1,12 @@
|
||||
name: Test documentation
|
||||
name: Build documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
test-docs:
|
||||
name: Test documentation
|
||||
build-docs:
|
||||
name: Build documentation
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
@ -17,4 +18,10 @@ jobs:
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm run build
|
||||
npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docs
|
||||
path: docs/build
|
@ -1,4 +1,4 @@
|
||||
name: Build documentation
|
||||
name: Deploy documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@ -16,22 +16,21 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
name: build-docs
|
||||
name: Build documentation
|
||||
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@main
|
||||
deploy-docs:
|
||||
needs: build-docs
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- uses: actions/checkout@v3 # check out this repo
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm run build
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docs
|
||||
path: docs/build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
Loading…
Reference in New Issue
Block a user