mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-28 13:39:00 +07:00
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
---
|
|
name: Build and deploy docs
|
|
"on":
|
|
schedule:
|
|
# Run at 05:17 on Tuesday and Thursday
|
|
- cron: '17 5 * * 2,4'
|
|
workflow_dispatch:
|
|
inputs:
|
|
repository-owner:
|
|
description: GitHub account or org that owns the repository
|
|
type: string
|
|
required: true
|
|
default: ansible
|
|
repository-name:
|
|
description: Name of the GitHub repository
|
|
type: string
|
|
required: true
|
|
default: ansible-documentation
|
|
repository-branch:
|
|
description: Branch, tag, or commit SHA
|
|
type: string
|
|
required: true
|
|
default: devel
|
|
ansible-package-version:
|
|
description: Ansible community package version
|
|
type: choice
|
|
required: true
|
|
default: devel
|
|
options:
|
|
- devel
|
|
- '12'
|
|
- '11'
|
|
- '10'
|
|
- '9'
|
|
deploy:
|
|
description: Deploy the build
|
|
type: boolean
|
|
required: true
|
|
deployment-environment:
|
|
description: Deployment environment
|
|
type: choice
|
|
required: true
|
|
default: test
|
|
options:
|
|
- production
|
|
- test
|
|
|
|
jobs:
|
|
build-package-docs:
|
|
name: 📝 Build
|
|
uses: ./.github/workflows/reusable-build-docs.yaml
|
|
with:
|
|
repository-owner: ${{ github.event.inputs.repository-owner || 'ansible' }}
|
|
repository-name: ${{ github.event.inputs.repository-name || 'ansible-documentation' }}
|
|
repository-branch: ${{ github.event.inputs.repository-branch || 'devel' }}
|
|
ansible-package-version: ${{ github.event.inputs.ansible-package-version || 'devel' }}
|
|
secrets:
|
|
DOCS_BOT_TOKEN: ${{ secrets.DOCS_BOT_TOKEN }}
|
|
|
|
deploy-package-docs:
|
|
name: 🚀 Deploy
|
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true'
|
|
needs: build-package-docs
|
|
uses: ./.github/workflows/reusable-deploy-docs.yaml
|
|
with:
|
|
ansible-package-version: ${{ github.event.inputs.ansible-package-version }}
|
|
deployment-environment: ${{ github.event.inputs.deployment-environment }}
|
|
repository-owner: ${{ github.event.inputs.repository-owner }}
|
|
repository-branch: ${{ github.event.inputs.repository-branch }}
|
|
secrets:
|
|
DEPLOY_DOC_BUILD: ${{ secrets.DEPLOY_DOC_BUILD }}
|