File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto-merge on Build Pass
2+
3+ on :
4+ push :
5+ branches :
6+ - ' claude/**'
7+ - ' !main'
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ build-and-merge :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - uses : actions/setup-node@v4
22+ with :
23+ node-version : 18.x
24+
25+ - uses : actions/setup-python@v5
26+ with :
27+ python-version : " 3.11"
28+ cache : " pip"
29+
30+ - name : Install Python requirements
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install -r requirements.txt
34+
35+ - name : Install MyST Markdown
36+ run : npm install -g mystmd
37+
38+ - name : Build HTML Assets (execute)
39+ run : myst build --execute --html
40+
41+ - name : Merge to main
42+ if : success()
43+ run : |
44+ git config --global user.name "github-actions[bot]"
45+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
46+
47+ # Fetch latest main
48+ git fetch origin main
49+
50+ # Switch to main
51+ git checkout main
52+
53+ # Merge the branch
54+ git merge --no-ff ${{ github.sha }} -m "Auto-merge ${{ github.ref_name }} after successful build"
55+
56+ # Push to main
57+ git push origin main
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Jupyter Book (via myst) GitHub Pages Deploy
22on :
33 push :
44 branches : [main]
5+ workflow_run :
6+ workflows : ["Auto-merge on Build Pass"]
7+ types :
8+ - completed
59
610env :
711 BASE_URL : " /${{ github.event.repository.name }}"
@@ -17,6 +21,7 @@ concurrency:
1721
1822jobs :
1923 deploy :
24+ if : ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'push' }}
2025 environment :
2126 name : github-pages
2227 url : ${{ steps.deployment.outputs.page_url }}
You can’t perform that action at this time.
0 commit comments