mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-07-11 23:26:32 +02:00
ce10c70054
astral-sh/setup-uv enable-cache defaults to keying off uv.lock, which this repo intentionally gitignores, so every push to main since 2026-06-17 failed at the cache step before the build ever ran.
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
name: Deploy Website to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**/*.md'
|
|
- 'scripts/build_website.py'
|
|
- 'scripts/vendor_assets.py'
|
|
- 'scripts/website_templates/**'
|
|
- '.github/workflows/pages.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
name: Build static site
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
|
|
- name: Cache vendor assets
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: scripts/.vendor-cache
|
|
key: vendor-${{ hashFiles('scripts/vendor_assets.py') }}
|
|
restore-keys: |
|
|
vendor-
|
|
|
|
- name: Build website
|
|
run: uv run scripts/build_website.py --verbose
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: site
|
|
|
|
deploy:
|
|
name: Deploy to GitHub Pages
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|