diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 47f4de3ef..722381d5e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,11 +12,20 @@ on: release: types: - published + workflow_dispatch: + inputs: + ref: + description: 'Git ref (refs/heads/, refs/tags/, etc.) or SHA' + required: true + type: string concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + ref: ${{ inputs.ref || github.ref }} + jobs: path-filter: permissions: @@ -26,6 +35,8 @@ jobs: changes: ${{ steps.filter.outputs.changes }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ env.ref }} - id: filter uses: dorny/paths-filter@v2 with: @@ -42,6 +53,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ env.ref }} - run: docker run --rm --volume "${PWD}:/workdir" ghcr.io/igorshubovych/markdownlint-cli:latest --disable MD013 MD033 MD041 MD046 -- "**/*.md" build: @@ -52,6 +65,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: ${{ env.ref }} # the `git-revision-date-localized` plugin needs full history to find page creation date fetch-depth: 0 - uses: actions/setup-python@v5 @@ -59,7 +73,7 @@ jobs: python-version: 3.x - uses: actions/cache@v4 with: - key: ${{ github.ref }} + key: ${{ env.ref }} path: .cache - run: | pip install --requirement docs/requirements.txt @@ -81,13 +95,14 @@ jobs: jobs: ${{ toJSON(needs) }} deploy: - if: github.event_name == 'release' + if: ${{ github.event_name != 'pull_request' }} permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: + ref: ${{ env.ref }} # the `git-revision-date-localized` plugin needs full history to find page creation date fetch-depth: 0 - uses: actions/setup-python@v5 @@ -95,7 +110,7 @@ jobs: python-version: 3.x - uses: actions/cache@v4 with: - key: ${{ github.ref }} + key: ${{ env.ref }} path: .cache - run: | pip install --requirement docs/requirements.txt diff --git a/.github/workflows/gh-release-drafter.yml b/.github/workflows/gh-release-drafter.yml index f677ca48c..61535499d 100644 --- a/.github/workflows/gh-release-drafter.yml +++ b/.github/workflows/gh-release-drafter.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: inputs: ref: - description: 'Git ref or SHA' + description: 'Git ref (refs/heads/, refs/tags/, etc.) or SHA' required: true type: string diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 16573d494..3ab1d6f47 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -13,7 +13,7 @@ on: workflow_dispatch: inputs: ref: - description: 'Git ref or SHA' + description: 'Git ref (refs/heads/, refs/tags/, etc.) or SHA' required: true type: string