e940d071f0
Automated Testing / Code Quality (Lint & Format) (push) Has been cancelled
Automated Testing / Security Scan (push) Has been cancelled
Automated Testing / Type Checking (push) Has been cancelled
Automated Testing / Build EPUB Artifact (push) Has been cancelled
Automated Testing / Test Summary (push) Has been cancelled
Automated Testing / Unit Tests (Python 3.11) (push) Has been cancelled
Automated Testing / Unit Tests (Python 3.10) (push) Has been cancelled
Automated Testing / Unit Tests (Python 3.12) (push) Has been cancelled
Documentation Checks / Summary (push) Has been cancelled
Documentation Checks / Cross-reference Check (push) Has been cancelled
Documentation Checks / Check Links (push) Successful in 8m28s
Documentation Checks / Mermaid Syntax (push) Failing after 5m21s
Deploy Website to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
Deploy Website to GitHub Pages / Build static site (push) Has been cancelled
Documentation Checks / Markdown Linting (push) Has been cancelled
81 lines
2.1 KiB
YAML
81 lines
2.1 KiB
YAML
name: Build and Release EPUB
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build EPUB (${{ matrix.lang }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
# Don't cancel other languages if one fails — we still want to release
|
|
# whichever languages built successfully.
|
|
fail-fast: false
|
|
matrix:
|
|
lang: [en, vi, zh]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install Mermaid CLI
|
|
run: npm install -g @mermaid-js/mermaid-cli
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
uv venv
|
|
uv pip install -r scripts/requirements-dev.txt
|
|
|
|
- name: Build EPUB
|
|
run: |
|
|
echo '{"args":["--no-sandbox","--disable-setuid-sandbox"]}' > /tmp/puppeteer-ci.json
|
|
uv run scripts/build_epub.py \
|
|
--lang ${{ matrix.lang }} \
|
|
--puppeteer-config /tmp/puppeteer-ci.json
|
|
|
|
- name: Upload EPUB artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: epub-${{ matrix.lang }}
|
|
path: claude-howto-guide*.epub
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
|
|
release:
|
|
name: Publish GitHub Release
|
|
needs: build
|
|
# Release even if some language builds failed — we still publish the
|
|
# artifacts that did build. `needs.build.result != 'cancelled'` guards
|
|
# against manually cancelled runs.
|
|
if: ${{ always() && needs.build.result != 'cancelled' }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Download all EPUB artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: dist
|
|
pattern: epub-*
|
|
merge-multiple: true
|
|
|
|
- name: List built artifacts
|
|
run: ls -lh dist/
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: dist/*.epub
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: true
|