Updated Kosat, now you can only specify clauses #35
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: Deploy site | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
| steps: | |
| - name: Checkout latest code | |
| uses: actions/checkout@v2 | |
| - name: Setup Java | |
| uses: actions/setup-java@v2 | |
| with: | |
| distribution: zulu | |
| java-version: 11 | |
| - name: Setup build cache | |
| uses: pat-s/always-upload-cache@v2 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Build project using Gradle | |
| run: ./gradlew build -x test -x jvmTest --stacktrace --scan | |
| - name: Deploy site | |
| if: ${{ success() }} && github.event_name == 'push' | |
| run: | | |
| set -o xtrace | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| sudo cp -r ./build/distributions /usr | |
| git fetch | |
| git stash | |
| git checkout gh-pages | |
| rm -rf docs | |
| mkdir docs | |
| sudo cp -r /usr/distributions/* ./docs/ | |
| git add . | |
| git commit -am "${{ github.event.head_commit.message }}" | |
| git push |