Publish Docs #1
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 Docs | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Package Release"] | |
types: | |
- completed | |
jobs: | |
publish-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry==${{ vars.POETRY_VERSION }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: "poetry" | |
cache-dependency-path: "pyproject.toml" | |
- name: Install Dependencies | |
# Install all dependencies so that the docs can use the function and type signatures. | |
run: | | |
pipx install invoke | |
poetry install --all-extras --without test,dev | |
- name: Build Docs | |
run: invoke docs-build | |
- name: Add GitHub Pages Config | |
run: | | |
touch docs/build/html/.nojekyll | |
echo "protect.docs.rungalileo.io" > docs/build/html/CNAME | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_PROTECT_DOCS_DEPLOY_KEY }} | |
with: | |
source-directory: "docs/build/html" | |
target-directory: "docs/" | |
destination-github-username: "rungalileo" | |
destination-repository-name: "protect-docs" | |
user-name: galileo-automation | |
user-email: ci@rungalileo.io |