From 78f607635cef57ff011fa9ec96684aa0975e5c53 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 30 Nov 2023 18:11:17 +0700 Subject: [PATCH] ci(deploy): merge `generate-docs` job to `deploy-pages` job --- .github/workflows/deploy.yaml | 37 +++++++++++++++-------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e30f862..7208b4a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,10 +4,23 @@ on: push: branches: [main] jobs: - generate-docs: - name: Generate Documentation + deploy-pages: + name: Deploy Pages runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + concurrency: + group: pages + cancel-in-progress: false steps: + - name: Setup Pages + uses: actions/configure-pages@v3.0.6 + - name: Checkout uses: actions/checkout@v4.1.1 @@ -26,29 +39,11 @@ jobs: - name: Generate Documentation run: yarn doc - - name: Upload Documentation as Pages + - name: Upload Documentation uses: actions/upload-pages-artifact@v2.0.0 with: path: docs - deploy-pages: - name: Deploy Pages - needs: generate-docs - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - concurrency: - group: pages - cancel-in-progress: false - steps: - - name: Setup Pages - uses: actions/configure-pages@v3.0.6 - - name: Deploy Pages id: deployment uses: actions/deploy-pages@v2.0.4