feat: Phase 21 Compiler Pipeline — lexer tokenization, parser AST gro… #21
This file contains hidden or 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: Update Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '*.py' | |
| - 'vis.js' | |
| - '.github/workflows/pages.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-page: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install deps | |
| run: pip install numpy Pillow && sudo apt-get update && sudo apt-get install -y ffmpeg | |
| - name: Generate audio | |
| run: | | |
| for f in *.py; do | |
| case "$f" in render_video.py|generate_page.py) continue;; esac | |
| echo "=== Running $f ===" | |
| python3 "$f" || true | |
| done | |
| - name: Find latest release tag | |
| id: tag | |
| run: | | |
| TAG=$(gh release view --json tagName -q .tagName 2>/dev/null || echo "latest") | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Convert wav to mp3 for web playback | |
| run: | | |
| mkdir -p docs/audio | |
| for f in output/*.wav; do | |
| [ -f "$f" ] || continue | |
| name=$(basename "$f" .wav) | |
| ffmpeg -y -i "$f" -codec:a libmp3lame -q:a 2 "docs/audio/${name}.mp3" | |
| done | |
| - name: Generate page | |
| env: | |
| TAG: ${{ steps.tag.outputs.tag }} | |
| run: python3 generate_page.py | |
| - name: Upload new assets to release | |
| if: steps.tag.outputs.tag != 'latest' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="${{ steps.tag.outputs.tag }}" | |
| # Get existing asset names | |
| gh release view "$TAG" --json assets -q '.assets[].name' | sort > /tmp/existing.txt | |
| # Upload any output files not already in the release | |
| for f in output/*.wav output/*.mp4; do | |
| [ -f "$f" ] || continue | |
| name=$(basename "$f") | |
| if ! grep -qxF "$name" /tmp/existing.txt; then | |
| echo "Uploading new asset: $name" | |
| gh release upload "$TAG" "$f" --clobber | |
| fi | |
| done | |
| - name: Push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/ | |
| git diff --cached --quiet || (git commit -m "update album page [skip ci]" && git push) |