Merge pull request #1271 from Friendseeker/fix-cla #642
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: CI | |
on: | |
pull_request: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
JVM_OPTS: -Dfile.encoding=UTF-8 -Xmx1G -Xms1G -server -XX:ReservedCodeCacheSize=128M | |
JAVA_OPTS: -Dfile.encoding=UTF-8 -Xmx1G -Xms1G -server -XX:ReservedCodeCacheSize=128M | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
cache: 'sbt' | |
- name: Setup sbt | |
uses: sbt/setup-sbt@v1 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Build and test | |
run: | | |
sbt -v scalafmtSbtCheck scalafmtCheckAll scripted makeSite | |
- name: Pandoc English | |
if: ${{ github.event_name == 'push' && github.repository == 'sbt/website' && github.ref == 'refs/heads/1.x' }} | |
uses: eed3si9n/pandoc@master | |
with: | |
args: '--pdf-engine=xelatex --toc -s -o target/pamflet/sbt-reference.pdf target/pamflet/Combined+Pages+Pdf.md' | |
- name: Pandoc Japanese | |
if: ${{ github.event_name == 'push' && github.repository == 'sbt/website' && github.ref == 'refs/heads/1.x' }} | |
uses: eed3si9n/pandoc@master | |
with: | |
args: '--pdf-engine=xelatex -V CJKmainfont="Noto Sans JP" --toc -s -o target/pamflet/ja/sbt-reference.pdf target/pamflet/ja/Combined+Pages+Pdf.md' | |
- name: Pandoc Chinese | |
if: ${{ github.event_name == 'push' && github.repository == 'sbt/website' && github.ref == 'refs/heads/1.x' }} | |
uses: eed3si9n/pandoc@master | |
with: | |
args: '--pdf-engine=xelatex -V CJKmainfont="Noto Sans SC" --toc -s -o target/pamflet/zh-cn/sbt-reference.pdf target/pamflet/zh-cn/Combined+Pages+Pdf.md' | |
- name: Pandoc Spanish | |
if: ${{ github.event_name == 'push' && github.repository == 'sbt/website' && github.ref == 'refs/heads/1.x' }} | |
uses: eed3si9n/pandoc@master | |
with: | |
args: '--pdf-engine=xelatex --toc -s -o target/pamflet/es/sbt-reference.pdf target/pamflet/es/Combined+Pages+Pdf.md' | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets | |
- name: Deploy to GH Pages | |
if: ${{ github.event_name == 'push' && github.repository == 'sbt/website' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/1.x' || github.ref == 'refs/heads/1.x-beta') }} | |
run: .github/publish-site.sh | |
env: | |
DEPLOY_KEY_PASSPHRASE: ${{ secrets.DEPLOY_KEY_PASSPHRASE }} |