Skip to content

Commit e8465df

Browse files
committed
Add pear book action
1 parent 49f506d commit e8465df

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
push: # Trigger on push events (commits pushed to the repo)
5+
branches: # Specify branches; use '**' for all branches
6+
- add-pear-book
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install Node/NPM
14+
uses: actions/setup-node@v6
15+
- name: Install Pear
16+
run: |
17+
npm install -g pear
18+
- name: Checkout
19+
uses: actions/checkout@v6
20+
- name: Run Pearbook
21+
run: |
22+
pear run pear://runtime
23+
pear run --trusted pear://${{ vars.PEAR_BOOK_KEY }} --output pearbook .
24+
- name: Checkout new branch
25+
run: |
26+
git config --global user.email "eric.bauerfeld+pearbot@holepunch.to"
27+
git config --global user.name "Eric's Pearbot"
28+
git fetch
29+
git checkout -b preview
30+
git add pearbook
31+
git commit -m "Publish"
32+
git branch --set-upstream-to=origin/preview preview
33+
git pull --rebase --prune
34+
git push -u -f origin preview

0 commit comments

Comments
 (0)