mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-06 14:45:06 +08:00
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
name: Deploy documentation
|
|
on:
|
|
push:
|
|
branches:
|
|
- ci
|
|
- main
|
|
- dev
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-docs:
|
|
name: Build documentation
|
|
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
|
|
- build-docs-dev
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: docs
|
|
path: docs/build
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: docs-dev
|
|
path: docs/build/dev
|
|
- name: test
|
|
run: |
|
|
ls -lR docs/build
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v2
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: docs/build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v2 |