diff --git a/.github/workflows/trigger-push-stable.yml b/.github/workflows/trigger-push-stable.yml index b175ca3..516b5da 100644 --- a/.github/workflows/trigger-push-stable.yml +++ b/.github/workflows/trigger-push-stable.yml @@ -6,21 +6,16 @@ concurrency: # Cancel any existing runs of this workflow for this same PR cancel-in-progress: true on: - workflow_dispatch: push: branches: - stable jobs: - docs: - uses: ./.github/workflows/workflow-docs.yml - secrets: inherit - - changelog: - needs: ["docs"] - uses: ./.github/workflows/workflow-changelog.yml + changelog_and_docs: + uses: ./.github/workflows/workflow-changelog-and-docs.yml secrets: inherit release: - needs: ["changelog"] - uses: ./.github/workflows/workflow-release-drafter.yml \ No newline at end of file + needs: ["changelog_and_docs"] + uses: ./.github/workflows/workflow-release-drafter.yml + secrets: inherit diff --git a/.github/workflows/workflow-changelog.yml b/.github/workflows/workflow-changelog-and-docs.yml similarity index 82% rename from .github/workflows/workflow-changelog.yml rename to .github/workflows/workflow-changelog-and-docs.yml index 9f87194..8fd2e05 100644 --- a/.github/workflows/workflow-changelog.yml +++ b/.github/workflows/workflow-changelog-and-docs.yml @@ -1,6 +1,6 @@ --- # yamllint disable rule:truthy -name: "Update Changelog" +name: "Update Changelog & Documentation" on: workflow_call: @@ -21,7 +21,7 @@ jobs: python-version: 3.11 - name: Install antsibull-changelog, antsichaut - run: python -m pip install antsibull-changelog antsichaut --disable-pip-version-check + run: python -m pip install toml invoke antsibull-changelog antsichaut --disable-pip-version-check - name: Install pandoc run: sudo apt-get install pandoc @@ -38,6 +38,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Generate Docs" + run: "invoke generate-doc" + - name: Generate new version in changelog.yaml run: antsibull-changelog release -v --version "${{ steps.version.outputs.next-version }}" @@ -50,13 +53,13 @@ jobs: - name: Update Changelog.rst run: antsibull-changelog generate -v - - name: push changelog + - name: commit changelog and docs uses: github-actions-x/commit@v2.9 with: github-token: ${{ secrets.GH_INFRAHUB_BOT_TOKEN }} push-branch: 'stable' - commit-message: 'chore: update changelog' - files: CHANGELOG.rst changelogs/ + commit-message: 'chore: update changelog & docs' + files: docs/ CHANGELOG.rst changelogs/ name: opsmill-bot email: github-bot@opsmill.com rebase: true diff --git a/.github/workflows/workflow-docs.yml b/.github/workflows/workflow-docs.yml deleted file mode 100644 index a44b25a..0000000 --- a/.github/workflows/workflow-docs.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# yamllint disable rule:truthy -name: "Update Documentation" - -on: - workflow_call: - -jobs: - update_docs: - runs-on: "ubuntu-22.04" - name: "Create documentation inside docs-folder" - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_INFRAHUB_BOT_TOKEN }} - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: "Install Invoke" - run: "pip install toml invoke antsibull-docs" - - - name: "Generate Docs" - run: "invoke generate-doc" - - - name: commit documentation - uses: github-actions-x/commit@v2.9 - with: - github-token: ${{ secrets.GH_INFRAHUB_BOT_TOKEN }} - push-branch: 'stable' - commit-message: 'chore: update documentation' - files: docs/ - name: opsmill-bot - email: github-bot@opsmill.com diff --git a/.github/workflows/workflow-publish.yml b/.github/workflows/workflow-publish.yml index b7e3f91..de8f89e 100644 --- a/.github/workflows/workflow-publish.yml +++ b/.github/workflows/workflow-publish.yml @@ -56,5 +56,3 @@ jobs: with: api_key: "${{ secrets.INFRAHUB_GALAXY_API_TOKEN }}" publish: "${{ inputs.publish }}" - build: false - collection_dir: "build"