Skip to content

Commit 4b4cd5d

Browse files
authored
Merge pull request #98 from snowch-forks/main
latest updates
2 parents 20bad64 + cde3f7f commit 4b4cd5d

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/auto-merge.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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

.github/workflows/deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Jupyter Book (via myst) GitHub Pages Deploy
22
on:
33
push:
44
branches: [main]
5+
workflow_run:
6+
workflows: ["Auto-merge on Build Pass"]
7+
types:
8+
- completed
59

610
env:
711
BASE_URL: "/${{ github.event.repository.name }}"
@@ -17,6 +21,7 @@ concurrency:
1721

1822
jobs:
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 }}

0 commit comments

Comments
 (0)