Add renaming / syntax for CSP style hiding #118
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: Scala CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create code archive | |
run: zip -r code.zip doc js-api js-client project shared web .sbtopts build.sbt README.md | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Coursier cache | |
uses: coursier/cache-action@v6 | |
- name: Run tests | |
run: sbt "shared/test" | |
- name: Compile webtool | |
run: sbt webStage | |
- name: Compile JS api | |
run: sbt "jsApi/fullOptJS" | |
- name: Add code archive to web deployment | |
run: mv code.zip web/target/web/stage/ | |
- name: Deploy CI | |
uses: burnett01/rsync-deployments@5.2 | |
with: | |
switches: -avzr --delete | |
path: web/target/web/stage/ | |
remote_path: /www/htdocs/${{ secrets.CI_USER }}/${{ secrets.CI_DEPLOY_PATH }}/${{ github.head_ref || github.ref_name }}/ | |
remote_host: ${{ secrets.CI_DEPLOY_PATH }} | |
remote_user: ssh-${{ secrets.CI_USER }} | |
remote_key: ${{ secrets.CI_PRIVKEY }} | |
- name: Remove code archive from artifact | |
run: rm web/target/web/stage/code.zip | |
- name: Archive production webclient artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ltbt-spectroscopy-webclient | |
path: | | |
web/target/web/stage | |
- name: Archive production JS api artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ltbt-spectroscopy-js-api | |
path: | | |
js-api/target/eqfiddle-api.js | |
- name: Cleanup before cache | |
shell: bash | |
run: | | |
rm -rf "$HOME/.ivy2/local" || true | |
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | |
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | |
find $HOME/.sbt -name "*.lock" -delete || true |