From 4792fa6bb964771306a8f0bb510b5d6b1f63f413 Mon Sep 17 00:00:00 2001 From: sug44 Date: Mon, 25 May 2026 14:59:25 +0300 Subject: [PATCH 1/2] Deploy docs on create-release --- .github/workflows/deploy-docs.yml | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 000000000..bf0c8fc7b --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,44 @@ +on: + workflow_dispatch: + workflow_run: + workflows: [create-release] + types: [completed] + +jobs: + build: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} + steps: + - uses: actions/checkout@v6 + + - name: install dependencies + id: deps + run: | + pip install sphinx + pip install sphinx_rtd_theme + + - name: build docs + id: build + run: | + cd doc + make clean + make html + + - uses: actions/upload-pages-artifact@v5 + with: + path: doc/gh-pages + + + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5.0.0 From 3fb57de4f61f8eca4edfa5db1b0a6c34ee85e577 Mon Sep 17 00:00:00 2001 From: sug44 Date: Mon, 25 May 2026 15:43:34 +0300 Subject: [PATCH 2/2] Automatically pass version string from create-release to deploy-docs --- .github/workflows/create-release.yml | 6 ++++++ .github/workflows/deploy-docs.yml | 15 ++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index a12b7c986..1dff72107 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -15,3 +15,9 @@ jobs: version-template-extension: version-file: Resources/GameData/kOS/kOS.version artifacts: Resources/GameData LICENSE* README* CHANGELOG* + + deploy-docs: + needs: create-release + uses: ./.github/workflows/deploy-docs.yml + with: + version-string: ${{ inputs.version-string }} diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index bf0c8fc7b..64ff886b4 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,13 +1,18 @@ on: workflow_dispatch: - workflow_run: - workflows: [create-release] - types: [completed] + inputs: + version-string: + type: string + required: true + workflow_call: + inputs: + version-string: + type: string + required: true jobs: build: runs-on: ubuntu-latest - if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v6 @@ -22,7 +27,7 @@ jobs: run: | cd doc make clean - make html + make html SPHINXOPTS='-D version=${{ inputs.version-string }} -D release=${{ inputs.version-string }}' - uses: actions/upload-pages-artifact@v5 with: