diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04fc42644..09ed73082 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,12 +34,7 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 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: - # 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, '-') uses: ./.github/workflows/mkdocs.yml diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 755165c7d..4982a870a 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -14,8 +14,8 @@ on: jobs: mkdocs-prep: - # Runs the markdownlinter to ensure we don't release faulty markdown. - # Also gets the correct major version, wether the job is triggered by a version tag + # Runs the markdown linter to ensure we don't release faulty markdown. + # 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. runs-on: ubuntu-latest outputs: @@ -54,4 +54,25 @@ jobs: - run: git fetch origin gh-pages --depth=1 - run: | 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 diff --git a/.github/workflows/typedocs.yml b/.github/workflows/typedocs.yml deleted file mode 100644 index a91fa23a9..000000000 --- a/.github/workflows/typedocs.yml +++ /dev/null @@ -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