Support Scala3 #major (#301) #29
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: build-website | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'website/**' | |
jobs: | |
build-deploy-website: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: false | |
fetch-depth: 0 | |
- name: Setup Scala | |
uses: olafurpg/setup-scala@v10 | |
with: | |
java-version: [email protected] | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.80.0' | |
extended: true | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '12' | |
- name: Build API Docs | |
run: | | |
sbt awssdk/doc | |
cp -rf ./awssdk/target/scala-2.13/api ./website/static | |
- name: Build | |
run: | | |
cd website | |
npm install | |
mkdir -p ./static/css | |
hugo gen chromastyles --style=monokai >> assets/scss/components/_syntax.scss | |
hugo | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/public | |
- name: Push changes to main | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git status | |
git add ./website/static/* | |
git commit -m "Update website [ci skip]" || echo "No changes to commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |