From 5bafdac7927e176eab281342396c295476c0dae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Chlup?= Date: Mon, 14 Oct 2024 12:54:19 +0200 Subject: [PATCH] ci: Use built docs in Deploy job, use single file --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .github/workflows/deploy.yml | 27 --------------------------- 2 files changed, 19 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1caf66..891a623 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,3 +28,22 @@ jobs: name: generated-docs path: docs/target/generated-docs/* retention-days: 7 + + deploy: + needs: ci + if: github.repository_owner == 'modcluster' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Get generated-docs + uses: actions/download-artifact@v4 + with: + name: generated-docs + path: generated-docs/ + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4.6.8 + with: + branch: gh-pages + folder: generated-docs/ + git-config-name: mod_cluster documentation bot + git-config-email: docs-bot@modcluster.io + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 14e3f15..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Deploy -on: - push: - branches: - - main -jobs: - build-and-deploy: - runs-on: ubuntu-latest - if: github.repository_owner == 'modcluster' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 17 - cache: maven - - name: Build with Maven - run: ./mvnw --batch-mode --no-transfer-progress verify - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4.6.8 - with: - branch: gh-pages - folder: docs/target/generated-docs/ - git-config-name: mod_cluster documentation bot - git-config-email: docs-bot@modcluster.io