mirror of
https://github.com/vinta/awesome-python.git
synced 2026-04-14 15:21:42 +08:00
Adds a workflow_run trigger so the site is rebuilt whenever fresh star data lands on master, in addition to the existing push trigger. The build job guard ensures it only runs on direct pushes or when the upstream workflow concluded successfully. Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.0 KiB
YAML
54 lines
1.0 KiB
YAML
name: Deploy Website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_run:
|
|
workflows: ["Fetch GitHub Stars"]
|
|
types: [completed]
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --group build
|
|
|
|
- name: Build site
|
|
run: make build
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: website/output/
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: https://awesome-python.com/
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|