Make sure to dispatch ready #1447
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: Deploy | |
on: | |
push: | |
release: | |
types: [created] | |
jobs: | |
job: | |
name: Build docs | |
runs-on: ubuntu-latest | |
env: | |
TARGET: steam-py/steam-py.github.io | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.TARGET }} | |
path: steam-py.github.io | |
- name: Install poetry | |
run: pipx install poetry && pipx install poethepoet | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
cache: "poetry" | |
- name: Install Dependencies | |
run: | | |
poetry install --with docs | |
- name: Build | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
poetry run python scripts/build_docs_for_pages.py | |
- name: Build | |
if: ${{ github.event_name == 'release' }} | |
run: | | |
poetry run python scripts/build_docs_for_pages.py --tag=${{ github.event.release.tag_name }} | |
- name: Push | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.DEPLOY_KEY }} | |
external_repository: ${{ env.TARGET }} | |
publish_branch: main | |
publish_dir: steam-py.github.io | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |