ci: add CNAME to Pages #90
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 & Deploy | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Skip on release, but run after the release when bumping to the next SNAPSHOT version | |
if: | | |
!startsWith(github.event.head_commit.message, 'chore(main): release') || contains(github.event.head_commit.message, 'SNAPSHOT') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradlew | |
id: gradlew | |
- name: Deploy to Github Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: build/web | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update nightly release | |
if: success() | |
uses: pyTooling/Actions/releaser@main | |
with: | |
tag: nightly | |
rm: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: ${{ steps.gradlew.outputs.jar_file }} | |
- name: Publish package | |
run: ./gradlew publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |