From ffa015dc21fe2863011cf7886e117b86345319cc Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 23 Dec 2022 21:20:50 +0100 Subject: [PATCH] Let the documentation workflow fetch the required git branch --- .github/workflows/documentation.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 3a65a6626b..6a2a5ff544 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -82,19 +82,29 @@ jobs: run: | make all - - name: Clone docs.openra.net + - name: Clone docs.openra.net (Playtest) + if: startsWith(github.event.inputs.tag, 'playtest-') uses: actions/checkout@v2 with: repository: openra/docs token: ${{ secrets.DOCS_TOKEN }} path: docs + ref: playtest + + - name: Clone docs.openra.net (Release) + if: startsWith(github.event.inputs.tag, 'release-') + uses: actions/checkout@v2 + with: + repository: openra/docs + token: ${{ secrets.DOCS_TOKEN }} + path: docs + ref: release - name: Update docs.openra.net (Playtest) if: startsWith(github.event.inputs.tag, 'playtest-') env: GIT_TAG: ${{ github.event.inputs.tag }} run: | - git checkout playtest ./utility.sh all --docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/traits.md" ./utility.sh all --weapon-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/weapons.md" ./utility.sh all --sprite-sequence-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/sprite-sequences.md" @@ -105,7 +115,6 @@ jobs: env: GIT_TAG: ${{ github.event.inputs.tag }} run: | - git checkout release ./utility.sh all --docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/traits.md" ./utility.sh all --weapon-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/weapons.md" ./utility.sh all --sprite-sequence-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/sprite-sequences.md"