Skip to content

Commit 19be6fe

Browse files
committed
Build can now be triggered via commit
1 parent 8286de6 commit 19be6fe

File tree

3 files changed

+47
-15
lines changed

3 files changed

+47
-15
lines changed

.github/workflows/build-pr.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build website PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
types:
8+
- closed
9+
10+
concurrency:
11+
group: "builders"
12+
cancel-in-progress: true
13+
14+
jobs:
15+
if_merged:
16+
if: github.event.pull_request.merged == true
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
ref: main
23+
fetch-depth: 0
24+
- name: Install dependencies
25+
run: |
26+
curl -sSL https://install.python-poetry.org | python3 -
27+
make install
28+
- name: Build website
29+
run: make website
30+
- name: Commit files
31+
run: |
32+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+
git config --local user.name "github-actions[bot]"
34+
git commit -a -m "Built website"
35+
- name: Push changes
36+
uses: ad-m/github-push-action@master
37+
with:
38+
branch: main

.github/workflows/build.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
name: Build website
22

3-
on:
4-
pull_request:
5-
branches:
6-
- "main"
7-
types:
8-
- closed
9-
10-
#workflow_dispatch:
3+
on:
4+
workflow_dispatch:
115

12-
#push:
13-
# branches:
14-
# - 'main'
15-
# paths:
16-
# - './templates/**'
6+
push:
7+
branches:
8+
- 'main'
9+
paths:
10+
- './templates/**'
1711

1812
concurrency:
1913
group: "builders"
2014
cancel-in-progress: true
2115

2216
jobs:
23-
if_merged:
24-
if: github.event.pull_request.merged == true
17+
build:
2518
runs-on: ubuntu-latest
2619
steps:
2720
- name: Checkout

.github/workflows/pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
workflow_run:
1313
workflows:
1414
- Build website
15+
- Build website PR
1516
types:
1617
- completed
1718

0 commit comments

Comments
 (0)