Skip to content

ci: add toast updater automator #61

ci: add toast updater automator

ci: add toast updater automator #61

Workflow file for this run

name: Tests and Linting
on:
pull_request:
push:
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Pre-Commit
run: python -m pip install pre-commit && pre-commit install
- name: Load cached Pre-Commit Dependencies
id: cached-pre-commit-dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
build-page:
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: pdm-project/setup-pdm@v3
name: Set up PDM
with:
python-version: "3.11"
- name: Install App Dependencies
run: pdm install
- name: Build page
run: pdm run make page
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: page/_build/html
clean-exclude: |
1
lib
engage_toaster:
runs-on: ubuntu-latest
needs: validate
steps:
- name: Trigger Litestar Toast Update Release Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'update-toast.yml',
ref: 'main'
});