-
Notifications
You must be signed in to change notification settings - Fork 210
57 lines (50 loc) · 1.5 KB
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Site
on:
push:
branches: [ main ]
jobs:
site:
name: Site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_ACCESS_TOKEN }}
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
- name: Cache Jbang
uses: actions/cache@v3
with:
path: ~/.jbang/cache/
key: ${{ runner.os }}-jbang-cache-${{ hashFiles('**/*.java') }}
restore-keys: |
${{ runner.os }}-jbang-
- name: Parse data
run: |
cd resources
./jbang site.java ../java-champions.yml ../site/content/
- name: Generate site
run: |
cd site
echo "::group::⬇️️ install jbake"
candidate=jbake
version=2.6.7
platform=$(uname)
curl -L -o jbake.zip https://api.sdkman.io/2/broker/download/$candidate/$version/$platform
unzip -qo jbake.zip
echo "::endgroup::"
echo "::group::🚀 run jbake"
cp ../java-champions.yml ../site/content/resources
./jbake-${version}-bin/bin/jbake -b
touch output/.nojekyll
echo "::endgroup::"
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
folder: site/output
branch: 'gh-pages'
commit-message: "Publish site for ${{ github.sha }}"