summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-06-08 11:11:44 +0200
committerGitHub <noreply@github.com>2023-06-08 11:11:44 +0200
commit806c1b71122575f89215aef7b9f394a9076f76e8 (patch)
treeba26d32a062ba3b64755629201f44515aef66a14
parentb19e10c9aed41ce36edd75de801cbb0af55a8e46 (diff)
GHA: Improvements for auto-deploy docs (#503)
- Change incorrect --deploy parameter to --push - Allow for manual trigger of workflow - Call publish-docs workflow from ci workflow when committing on main
-rw-r--r--.github/workflows/ci.yml12
-rw-r--r--.github/workflows/publish-docs.yml17
2 files changed, 24 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 373a5c0..112c7d5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -146,7 +146,6 @@ jobs:
auto-publish-dev:
needs:
- check
- - doc_checks
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/publish-release.yml
@@ -155,3 +154,14 @@ jobs:
environment: "production"
repo_release_ref: "main"
docker_image_tag: "latest_dev"
+
+ # When on main, auto publish docs
+ auto-publish-docs:
+ needs:
+ - check
+
+ if: github.ref == 'refs/heads/main'
+ uses: ./.github/workflows/publish-docs.yml
+ secrets: inherit # pass all secrets (required to access secrets in a called workflow)
+ with:
+ docs_version: "dev"
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
index e0135b2..2db7c3c 100644
--- a/.github/workflows/publish-docs.yml
+++ b/.github/workflows/publish-docs.yml
@@ -1,9 +1,18 @@
name: Publish Docs
on:
- push:
- branches:
- - main
+ workflow_call:
+ inputs:
+ docs_version:
+ description: "Version to build docs for (dev | latest | 0.19.x | ...)"
+ required: true
+ type: string
+ workflow_dispatch:
+ inputs:
+ docs_version:
+ description: "Version to build docs for (dev | latest | 0.19.x | ...)"
+ type: string
+ default: dev
permissions:
contents: write
@@ -21,4 +30,4 @@ jobs:
run: python -m pip install hatch==1.6.3
- name: Deploy dev docs
- run: hatch run docs:mike deploy --force --update-aliases dev \ No newline at end of file
+ run: hatch run docs:mike deploy --push --update-aliases ${{ inputs.docs_version }} \ No newline at end of file