diff options
| -rw-r--r-- | .github/workflows/ci.yaml | 50 | ||||
| -rw-r--r-- | .github/workflows/docs.yaml | 42 | ||||
| -rw-r--r-- | .github/workflows/dokka.yaml | 52 |
3 files changed, 47 insertions, 97 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 05f262b..aa792fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,6 +7,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: build_plugin: @@ -45,9 +46,6 @@ jobs: - name: Build with shadowJar run: ./gradlew :platform-paper:shadowJar :platform-velocity:shadowJar --parallel --no-daemon - - name: Generate Dokka - run: ./gradlew :dokka:dokkaGenerate --no-daemon - - name: Upload build artifacts uses: actions/upload-artifact@v7 if: success() @@ -58,6 +56,45 @@ jobs: platform-velocity/build/libs/LunaticChat-*-velocity.jar retention-days: 7 + build_dokka: + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Development Environment + uses: jdx/mise-action@v4 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Generate Dokka + run: ./gradlew :dokka:dokkaGenerate --no-daemon + + - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v4 + with: + path: dokka/build/dokka/html + + deploy_dokka: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build_dokka + runs-on: ubuntu-24.04 + permissions: + pages: write + id-token: write + concurrency: + group: "pages" + cancel-in-progress: false + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 + build_docs: runs-on: ubuntu-24.04 defaults: @@ -83,3 +120,10 @@ jobs: - name: Build documentation run: bun run build + + - name: Deploy to Cloudflare Workers + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + workingDirectory: website diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index d9679ad..0000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: Deploy Docs - -on: - push: - branches: - - main - paths: - - "website/**" - - ".github/workflows/docs.yaml" - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-24.04 - concurrency: - group: docs-${{ github.ref }} - cancel-in-progress: false - permissions: - contents: read - defaults: - run: - working-directory: "./website" - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Setup Development Environment - uses: jdx/mise-action@v4 - with: - working_directory: . - - - name: Install dependencies - run: bun install - - - name: Build documentation - run: bun run build - - - name: Deploy to Cloudflare Workers - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - workingDirectory: website diff --git a/.github/workflows/dokka.yaml b/.github/workflows/dokka.yaml deleted file mode 100644 index faa4fc7..0000000 --- a/.github/workflows/dokka.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: Deploy Dokka - -on: - push: - branches: - - main - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-24.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Setup Development Environment - uses: jdx/mise-action@v4 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v6 - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Generate Dokka - run: ./gradlew :dokka:dokkaGenerate --no-daemon - - - name: Upload artifact - id: lunaticchat_dokka - uses: actions/upload-pages-artifact@v4 - with: - path: dokka/build/dokka/html - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-24.04 - needs: build - steps: - - name: Deploy to GitHub Pages - id: lunaticchat_dokka - uses: actions/deploy-pages@v5 |
