Merge pull request #652 from hexagonkt/develop #142
Workflow file for this run
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: Release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restore MkDocs Cache | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-mkdocs-${{ hashFiles('**/*.gradle*', '**/gradle*.properties') }} | |
restore-keys: ${{ runner.os }}-mkdocs- | |
path: | | |
~/.local/bin | |
~/.local/lib/python*/site-packages | |
- name: Check Out | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Up Java | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: 20 | |
distribution: graalvm-community | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: gradle | |
- name: Update Site | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export REMOTE="https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" | |
git remote set-url origin "$REMOTE" | |
git clone "$REMOTE" --branch gh-pages build/gh-pages | |
./gradlew build | |
./gradlew -x build buildSite | |
ls -AlF site/build/site | |
- name: Publish Packages | |
env: | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
run: ./gradlew --no-daemon -x test release | |
- name: Publish Site | |
run: | | |
cp -rf site/build/site/* build/gh-pages/ | |
cd build/gh-pages | |
git add --all | |
git commit -m "Publishing to gh-pages" | |
git push origin gh-pages |