Bump org.geysermc.geyser:api from 2.6.0-SNAPSHOT to 2.6.1-SNAPSHOT (#… #277
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 Website | |
on: | |
schedule: | |
- cron: '00 00 * * 0' | |
push: | |
branches: [ master, gh-pages ] | |
release: | |
types: [published] | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
jobs: | |
build-docs-stable: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest release with tag | |
id: latestrelease | |
run: | | |
echo "releasetag=$(curl -s https://api.github.com/repos/spartacus04/jext-reborn/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.releasetag }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.OS }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.OS }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build docs with Gradle | |
run: ./gradlew dokkaGeneratePublicationHtml | |
env: | |
jextVersion: ${{ env.releasetag }} | |
- name: Upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: stabledocs | |
path: build/dokka/html/ | |
build-docs-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest commit hash | |
id: latestcommit | |
run: | | |
echo "commitsha=$(curl -s https://api.github.com/repos/spartacus04/jext-reborn/branches/master | jq -r '.commit.sha' | cut -c1-7)" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.OS }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.OS }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build docs with Gradle | |
run: ./gradlew dokkaGeneratePublicationHtml | |
env: | |
jextVersion: ${{ steps.latestcommit.outputs.commitsha }} | |
- name: Upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: devdocs | |
path: build/dokka/html/ | |
build-publish: | |
permissions: | |
pages: write | |
id-token: write | |
needs: | |
- build-docs-stable | |
- build-docs-latest | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Download stable docs | |
uses: actions/download-artifact@v4 | |
with: | |
name: stabledocs | |
path: static/docs/stable-javadocs | |
- name: Download dev docs | |
uses: actions/download-artifact@v4 | |
with: | |
name: devdocs | |
path: static/docs/development-javadocs | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install | |
- name: Build site | |
run: bun run build | |
- name: Delete docs artifacts | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: | | |
stabledocs | |
devdocs | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "build/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload site | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |