-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.61 KB
/
deploy.yml
File metadata and controls
64 lines (54 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Convert and Deploy Song Notations
on:
push:
branches: [ main ]
paths:
- 'songs_reformatted.docx'
- 'reformat.py'
- 'convert_and_push.py'
- 'render_and_watermark.py'
- 'run_pipeline.py'
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
pages: write
id-token: write
jobs:
convert-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Playwright browsers
run: |
playwright install chromium
- name: Run Complete Pipeline
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
python run_pipeline.py
- name: Commit and push changes
run: |
git add output/
git diff --staged --quiet || git commit -m "Auto-update: Generated HTML and PNG from DOCX [$(date)]"
git push
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
publish_branch: gh-pages