Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: generate ibm.power_hmc collection documentation source files | |
# run sanity test during pull request to dev-collection | |
on: | |
release: | |
types: [published] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
######################################################################## | |
# generate doc files | |
######################################################################## | |
gen-doc: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.8'] | |
name: generate documenation source files | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: setup python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install document generation requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ansible | |
python -m pip install ansible-doc-extractor | |
python -m pip install sphinx | |
python -m pip install sphinx_rtd_theme | |
python -m pip install --upgrade myst-parser | |
- name: run document generator script | |
run: | | |
bash devops/bin/gen_doc.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: hmc-doc-artifact | |
path: ./docs/build | |
deploy-doc: | |
runs-on: ubuntu-latest | |
needs: gen-doc | |
environment: | |
name: github-pages | |
url: https://${{env.GITHUB_REPOSITORY_OWNER}}.github.io/ansible-power-hmc | |
permissions: | |
id-token: write | |
pages: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: hmc-doc-artifact | |
path: . | |
- uses: actions/configure-pages@v4 | |
with: | |
#User need to set this secret on github actions | |
token: ${{ secrets.TOKEN_PAM }} | |
enablement: true | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- id: deployment | |
uses: actions/deploy-pages@v3 | |
with: | |
token: ${{ secrets.TOKEN_PAM }} |