dev(deps): ruff 0.5.0 -> 0.5.1, certifi 2024.7.4 #477
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 Site | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Filter changed file paths to outputs | |
uses: dorny/paths-filter@v3.0.0 | |
id: changes | |
with: | |
filters: | | |
root_docs: | |
- CHANGES | |
- README.* | |
docs: | |
- '**/*.rst' | |
- '**/*.css' | |
- '**/*.md' | |
- '**/*.html' | |
python_files: | |
- '*.py' | |
- pyproject.toml | |
- poetry.lock | |
- .github/workflows/* | |
- name: Should publish | |
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true' | |
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV | |
- name: Install poetry | |
if: env.PUBLISH == 'true' | |
run: pipx install "poetry==1.8.3" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
if: env.PUBLISH == 'true' | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Install dependencies [w/ docs] | |
if: env.PUBLISH == 'true' | |
run: poetry install --with=docs | |
- name: Build documentation | |
if: env.PUBLISH == 'true' | |
run: | | |
make html | |
cp manifest.json _build/html | |
- name: Push documentation to S3 | |
if: env.PUBLISH == 'true' | |
uses: jakejarvis/s3-sync-action@v0.5.1 | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1 | |
SOURCE_DIR: '_build/html' # optional: defaults to entire repository | |
- name: Purge cache on Cloudflare | |
if: env.PUBLISH == 'true' | |
uses: jakejarvis/cloudflare-purge-action@v0.3.0 | |
env: | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} |