From 2da1a0b8146e9fa838b4137c017d152eafe76a2d Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Fri, 2 Aug 2024 10:50:33 +0200 Subject: [PATCH] fix(ci): Simplify docs workflow --- .github/workflows/docs.yaml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9b0b280a..2685d90c 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -8,41 +8,32 @@ on: branches: - main +permissions: + contents: write + jobs: - build-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python and dependencies - uses: ./.github/actions/python-deps - with: - pythonVersion: "3.11" - - name: Build documentation - run: mkdocs build - - name: Archive built documentation - uses: actions/upload-artifact@v4 - with: - name: docs - path: public/docs deploy-docs: runs-on: ubuntu-latest name: Deploy documentation to GitHub Pages # publish on 'main' only to prevent version clutter if: ${{ github.ref == 'refs/heads/main' }} - needs: [build-docs] steps: - uses: actions/checkout@v4 - name: Set up Python and dependencies uses: ./.github/actions/python-deps with: pythonVersion: "3.11" - - name: Restore built docs from artifacts - uses: actions/download-artifact@v4 + - name: Build pre-release documentation + run: mkdocs build + - name: Archive built documentation + uses: actions/upload-artifact@v4 with: name: docs path: public/docs - - name: Publish documentation + - name: Deploy pre-release documentation + if: ${{ github.ref_name == 'main'}} uses: ./.github/actions/mike-docs with: - version: ${{ github.event.release.tag_name }} - alias: latest + version: development + pre_release: true # include pre-release notification banner + push: true