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 new file mode 100644 index 000000000..64ff886b4 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,49 @@ +on: + workflow_dispatch: + inputs: + version-string: + type: string + required: true + workflow_call: + inputs: + version-string: + type: string + required: true + +jobs: + build: + runs-on: ubuntu-latest + 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 SPHINXOPTS='-D version=${{ inputs.version-string }} -D release=${{ inputs.version-string }}' + + - 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