diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6b50ec49..7e03ac8a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,11 +41,10 @@ jobs: run: mv build/html ".github/pages/${GITHUB_REF##*/}" - name: Publish Docs to gh-pages - # Only master and tags are published - if: "${{ github.repository_owner == 'dls-controls' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}" + if: github.ref_type == 'tag' || github.ref_name == 'main' || github.ref_name == 'master' # We pin to the SHA, not the tag, for security reasons. # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions - uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: .github/pages