diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3fcb4184ea..e7be0b651a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,9 @@ on: - .github/workflows/docs.yml - traffic_control/clients/python/**.py +permissions: + contents: write + jobs: documentation: if: github.event.pull_request.draft == false @@ -52,3 +55,17 @@ jobs: with: name: HTMLDocumentation path: docs/build/html/ + - name: Deploy to GitHub Pages #Push to gh-pages branch 1 + uses: peaceiris/actions-gh-pages@v3 + if: ${{ + github.event_name == 'pull_request' && + github.event.action == 'closed' && + github.event.pull_request.merged == true && + github.event.pull_request.base.ref == 'master' }} + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html/ + force_orphan: true + +