Merge pull request #107 from ThoughtWorksInc/update/master/scala3-lib… #44
This file contains hidden or 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 To Github Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| concurrency: ${{github.ref}} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: gh-pages | |
| fetch-depth: 0 # Need the git history for sbt-dynver to determine the version | |
| - name: Up Merge | |
| run: | | |
| git log --max-count=1 --format=format:%an | xargs -0 -n 1 git config --global -- user.name && | |
| git log --max-count=1 --format=format:%ae | xargs -0 -n 1 git config --global -- user.email && | |
| git config --global push.default simple && | |
| git config --global pull.rebase false && | |
| git pull --no-edit -X ours ${{github.server_url}}/${{github.repository}} ${{github.ref_name}} | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '11' | |
| distribution: 'adopt' | |
| - id: nodenv | |
| uses: nodenv/actions/node-version@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: "${{ steps.nodenv.outputs.node-version }}" | |
| - name: Cache SBT | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.ivy2/local/ | |
| ~/.ivy2/cache/ | |
| ~/.sbt/ | |
| ~/.coursier/ | |
| key: | | |
| ${{ runner.os }}-${{matrix.scala}}-${{ hashFiles('**/*.sbt') }} | |
| ${{ runner.os }}-${{matrix.scala}}- | |
| - name: Build | |
| run: sbt "set scalaJSStage in js := FullOptStage" indexHtml | |
| - name: Deploy | |
| run: | | |
| git rm --ignore-unmatch -r .github && | |
| git add . && | |
| git commit -m 'Publish to GitHub Pages' && | |
| git push origin gh-pages:gh-pages | |