name: Publish documentation on: release: types: [published] workflow_dispatch: inputs: tag: description: 'Tag to build the documentation from (e.g. v5.1.0), defaults to the selected branch' required: false type: string permissions: contents: read # Never run two deployments at once, and let a running one finish instead of # cancelling it halfway through publishing. concurrency: group: pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v7 with: ref: ${{ inputs.tag || github.ref }} - name: Set up uv uses: astral-sh/setup-uv@v9.0.0 with: enable-cache: true - name: Install dependencies run: uv sync - name: Generate the documentation run: make docs - name: Keep the custom domain (osmapi.metaodi.ch) run: cp CNAME docs/CNAME - name: Upload the documentation as a Pages artifact uses: actions/upload-pages-artifact@v5 with: path: docs deploy: runs-on: ubuntu-latest needs: [build] permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5