diff options
author | Joris Roovers <joris.roovers@gmail.com> | 2023-06-08 11:59:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 11:59:22 +0200 |
commit | 513c6559799e5deb1e7df461f2e553c3b4675d87 (patch) | |
tree | 961dcec95ea01f0fb88ae621c7865fb3961cff02 | |
parent | b1fa485e468eb3248f89fa6510555d7d509738a9 (diff) |
GHA: Fixes for publish-docs workflow (#505)
- Adds git user.name and user.email config required for mike to push to
the gh-pages branch.
- Checkout gh-pages branch
- Dynamic run name
-rw-r--r-- | .github/workflows/publish-docs.yml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 4a7e086..b882c39 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -1,4 +1,5 @@ name: Publish Docs +run-name: "Publish Docs (docs_version=${{ inputs.docs_version }})" on: workflow_call: @@ -21,7 +22,15 @@ jobs: deploy: runs-on: ubuntu-latest steps: + + # Checkout the gh-pages branch, we need to commit the docs to this branch below + - uses: actions/checkout@v3.3.0 + with: + ref: gh-pages + + # Now checkout the git ref on which we're working - uses: actions/checkout@v3.3.0 + - uses: actions/setup-python@v4.6.1 with: python-version: 3.11 @@ -29,5 +38,13 @@ jobs: - name: Install Hatch run: python -m pip install hatch==1.7.0 + - name: Configure Git for GitHub Actions bot + run: | + git config --local user.name 'github-actions[bot]' + git config --local user.email 'github-actions[bot]@users.noreply.github.com' + - name: Deploy dev docs - run: hatch run docs:mike deploy --push --update-aliases ${{ inputs.docs_version }}
\ No newline at end of file + run: hatch run docs:mike deploy --push --update-aliases ${{ inputs.docs_version }} + + # Note that it will take a few mins after this workflow has finished for the docs to be available on + # http://jorisroovers.github.io/gitlint
\ No newline at end of file |