Skip to content

Commit bad55ff

Browse files
authored
Finish move to GitHub Actions with build trigger
Closes: #5 PR: #13
1 parent 54983ec commit bad55ff

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/actions.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ name: JUnit Pioneer Site
33
on:
44
push:
55
branches: [ grandmaster, site-source ]
6+
repository_dispatch:
7+
types: [triggerSiteBuild]
68

79
jobs:
810
publish:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Check out repo
1214
uses: actions/checkout@v2
15+
with:
16+
ref: "grandmaster"
1317
- name: Set up Ruby
1418
uses: actions/setup-ruby@v1
1519
with:
@@ -23,9 +27,7 @@ jobs:
2327
ruby -v
2428
bundler -v
2529
java -version
26-
- name: "Gradle: setup"
27-
run: ./gradlew setup --no-daemon --stacktrace
28-
- name: "Gradle: build site"
29-
run: ./gradlew buildSite --no-daemon --stacktrace
30-
- name: "Gradle: publish site"
31-
run: ./gradlew pushSite --no-daemon --stacktrace
30+
- name: Gradle setup, build and push
31+
uses: eskatos/gradle-command-action@v1
32+
with:
33+
arguments: setup buildSite pushSite --no-daemon --stacktrace

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ With the correct credentials, `gradle pushSite` pushes the changes in `site` to
4949
For local experimentation with the site layout, it makes sense to first run `gradle buildSite` and then manually launch Jekyll in `site-source` with `bundle exec jekyll serve`.
5050
Note the `serve`, which launches a server on localhost (Jekyll messages list the port) and also watches the `site-source` directory for further changes.
5151

52+
### Build Trigger
53+
54+
Projects like [JUnit Pioneer (the expansion pack)](https://github.com/junit-pioneer/junit-pioneer) can trigger a site build with GitHub Actions with this step:
55+
56+
```yaml
57+
- name: Trigger Website Build
58+
uses: peter-evans/repository-dispatch@v1
59+
with:
60+
token: ${{ secrets.GH_WRITE_TOKEN }}
61+
repository: junit-pioneer/junit-pioneer.github.io
62+
event-type: triggerSiteBuild
63+
```
64+
5265
5366
## Background
5467

0 commit comments

Comments
 (0)