Publish staging-docs.pulpproject.org #123
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: Publish staging-docs.pulpproject.org | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# runs at 3:00 UTC daily on weekdays 1 to 5 (no weekends) | |
- cron: '00 3 * * 1-5' | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: "pulpcore" | |
jobs: | |
build-staging-docs: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
path: "pulpcore" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.9" | |
- name: "Build HTML site for staging-docs.pulpproject.org." | |
run: | | |
.github/workflows/scripts/build_all_docs.sh | |
- name: "Upload documentation site" | |
uses: "actions/upload-artifact@v3" | |
with: | |
name: "staging-docs.pulpproject.org.tar" | |
path: "pulpcore/staging-docs.pulpproject.org.tar" | |
if-no-files-found: "error" | |
publish-staging-docs: | |
runs-on: "ubuntu-latest" | |
needs: | |
- "build-staging-docs" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 1 | |
path: "pulpcore" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.9" | |
- name: "Setting secrets" | |
run: | | |
python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT" | |
env: | |
SECRETS_CONTEXT: "${{ toJson(secrets) }}" | |
- name: "Download built docs" | |
uses: "actions/download-artifact@v3" | |
with: | |
name: "staging-docs.pulpproject.org.tar" | |
path: "pulpcore/" | |
- name: "Publish docs to staging-docs.pulpproject.org" | |
run: | | |
.github/workflows/scripts/publish-staging-docs.sh |