mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Build API docs after mkdocs
Building mkdocs overwrites the entire folder, thereby replacing the typedocs. Hence the typedocs need to be written afterwards
This commit is contained in:
parent
84c532ba96
commit
6536d90d9c
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@ -34,12 +34,7 @@ jobs:
|
|||||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
typedocs-release:
|
|
||||||
# Release typedocs on version tag, but ignore pre-releases
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
|
|
||||||
uses: ./.github/workflows/typedocs.yml
|
|
||||||
|
|
||||||
mkdocs-release:
|
mkdocs-release:
|
||||||
# Release mkdocs on version tag, but ignore pre-releases
|
# Release documentation on version tag, but ignore pre-releases
|
||||||
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
|
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
|
||||||
uses: ./.github/workflows/mkdocs.yml
|
uses: ./.github/workflows/mkdocs.yml
|
||||||
|
23
.github/workflows/mkdocs.yml
vendored
23
.github/workflows/mkdocs.yml
vendored
@ -15,7 +15,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
mkdocs-prep:
|
mkdocs-prep:
|
||||||
# Runs the markdown linter to ensure we don't release faulty markdown.
|
# Runs the markdown linter to ensure we don't release faulty markdown.
|
||||||
# Also gets the correct major version, wether the job is triggered by a version tag
|
# Also gets the correct major version, whether the job is triggered by a version tag
|
||||||
# or a push to main to update the latest documentation.
|
# or a push to main to update the latest documentation.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@ -55,3 +55,24 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
cd documentation && mike deploy --push --update-aliases \
|
cd documentation && mike deploy --push --update-aliases \
|
||||||
${{ needs.mkdocs-prep.outputs.major }}.x latest
|
${{ needs.mkdocs-prep.outputs.major }}.x latest
|
||||||
|
|
||||||
|
|
||||||
|
typedocs:
|
||||||
|
# Build typedocs and publish them to the GH page.
|
||||||
|
# `mike deploy` overwrites the entire folder for a version so these need to be (re)built afterwards.
|
||||||
|
needs: [mkdocs-prep, mkdocs]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.1.0
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16.x'
|
||||||
|
- run: npm ci --ignore-scripts
|
||||||
|
- name: Generate typedocs
|
||||||
|
run: npm run typedocs
|
||||||
|
- name: Deploy typedocs
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./docs
|
||||||
|
destination_dir: ${{ needs.mkdocs-prep.outputs.major }}.x/docs
|
||||||
|
25
.github/workflows/typedocs.yml
vendored
25
.github/workflows/typedocs.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
name: Typedocs
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
typedocs:
|
|
||||||
# Build typedocs and publish them to the GH page
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.1.0
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '16.x'
|
|
||||||
- run: npm ci --ignore-scripts
|
|
||||||
- name: Generate typedocs
|
|
||||||
run: npm run typedocs
|
|
||||||
- name: Get tagged version
|
|
||||||
id: version
|
|
||||||
uses: battila7/get-version-action@v2
|
|
||||||
- name: Deploy typedocs
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./docs
|
|
||||||
destination_dir: ${{ steps.version.outputs.major }}.x/docs
|
|
Loading…
x
Reference in New Issue
Block a user