Publish GitHub Site #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |