Skip to content

Commit

Permalink
fix(ci): Simplify docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianoKF committed Aug 2, 2024
1 parent 342ec3b commit 2da1a0b
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2da1a0b

Please sign in to comment.