-
Notifications
You must be signed in to change notification settings - Fork 26
47 lines (40 loc) · 1.17 KB
/
publish-gh-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
name: Publish GitHub Site
on:
workflow_dispatch # Manually triggered
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# copy of site in ci
site:
name: Generate Site
strategy:
matrix:
os: [ ubuntu-latest ]
scala: [ 2.13 ]
java: [ corretto@17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java (corretto@17)
id: setup-java-corretto-17
if: matrix.java == 'corretto@17'
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
cache: sbt
- name: sbt update
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
run: sbt +update
- name: Generate site
run: sbt '++ ${{ matrix.scala }}' site/makeSite
- name: Publish site
# if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site/target
keep_files: true