mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-27 13:28:51 +07:00
add check-deploy job to publish workflow (#1814)
* add check-deploy job to publish workflow --------- Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com> Co-authored-by: Maxwell G <maxwell@gtmx.me>
This commit is contained in:
16
.github/workflows/build-package-docs.yaml
vendored
16
.github/workflows/build-package-docs.yaml
vendored
@@ -83,7 +83,7 @@ jobs:
|
||||
|
||||
- name: Set the VERSION variable
|
||||
run: echo VERSION="${PACKAGE_VERSION}" >> "${GITHUB_ENV}"
|
||||
|
||||
|
||||
- name: Build the Ansible community package docs
|
||||
run: make webdocs ANSIBLE_VERSION="${COLLECTION_LIST}"
|
||||
working-directory: build-directory/docs/docsite
|
||||
@@ -108,10 +108,14 @@ jobs:
|
||||
path: build-directory/docs/docsite/ansible-package-docs-html-*.tar.gz
|
||||
retention-days: 7
|
||||
|
||||
- name: Log the workflow inputs if deploy checked
|
||||
if: fromJSON(github.event.inputs.deploy)
|
||||
check-deploy:
|
||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true'
|
||||
needs: build-package-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log the workflow inputs if deployed
|
||||
run: |
|
||||
echo "## Deployment details :rocket:" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "## Deployment details :shipit:" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "Publish to: ${{ github.event.inputs.deployment-environment }}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "Package version: ${{ github.event.inputs.ansible-package-version }}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo "Owner: ${{ github.event.inputs.repository-owner }}" >> "${GITHUB_STEP_SUMMARY}"
|
||||
@@ -140,8 +144,8 @@ jobs:
|
||||
-d '{"msgtype": "m.text", "body": "${{ env.FAIL_MESSAGE }}"}'
|
||||
|
||||
deploy-package-docs:
|
||||
if: fromJSON(github.event.inputs.deploy)
|
||||
needs: build-package-docs
|
||||
needs:
|
||||
- check-deploy
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: deploy-package-docs
|
||||
|
||||
Reference in New Issue
Block a user