From 203b76492b6689c7a48575fe627e60bc6c339741 Mon Sep 17 00:00:00 2001 From: Rapsssito Date: Wed, 3 Jul 2024 15:10:58 +0200 Subject: [PATCH] chore: Merge release and docs actions --- .github/workflows/docs.yml | 20 -------------------- .github/workflows/main.yml | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 21 deletions(-) delete mode 100755 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100755 index a774870..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Build docs - -on: workflow_dispatch - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - id: deployment - uses: sphinx-notes/pages@v3 - with: - publish: false - documentation_path: './docs/source' - requirements_path: './requeriments_docs.txt' - - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ steps.deployment.outputs.artifact }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15b7d91..0d40dd7 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,9 @@ name: Semantic Release -on: workflow_dispatch +on: + push: + branches: + - main jobs: release: @@ -37,3 +40,17 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ steps.release.outputs.tag }} + + - id: deployment_docs + uses: sphinx-notes/pages@v3 + with: + publish: false + documentation_path: './docs/source' + requirements_path: './requeriments_docs.txt' + if: steps.release.outputs.released == 'true' + + - uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ steps.deployment_docs.outputs.artifact }} + if: steps.release.outputs.released == 'true'