diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7494d8f..5b778274 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-java@v4 with: distribution: microsoft java-version: 17 + - uses: actions/setup-node@v4 + with: + node-version: 20 - uses: gradle/actions/setup-gradle@v3 + - name: Test dRAGon run: gradle npmInstall npmLint test - name: Create Release @@ -18,8 +24,21 @@ jobs: run: npm version from-git --no-git-tag-version --prefix frontend - name: Set Docs Version run: npm version from-git --no-git-tag-version --prefix docs + + - name: Build Documentation + run: npm install --prefix docs && npm run build --prefix docs + - name: Build dRAGon run: gradle build -Pversion=$(gradle cV -q -Prelease.quiet) + - name: Push Release if: github.ref == 'refs/heads/main' run: gradle pushRelease + + - name: Deploy Documentation + uses: JamesIves/github-pages-deploy-action@releases/v3 + if: github.ref == 'refs/heads/main' + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: docs/build diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index da0fedee..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Update dRAGon Documentation -on: push -jobs: - build: - name: Build dRAGon Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Build Docusaurus - run: cd docs && npm install && npm run build - - name: Deploy - uses: JamesIves/github-pages-deploy-action@releases/v3 - if: github.ref == 'refs/heads/main' - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: docs/build \ No newline at end of file