build(ci): fix automated documentation publication at releasing
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 5 Jul 2024 13:56:45 +0000 (15:56 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 5 Jul 2024 13:56:45 +0000 (15:56 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.github/workflows/publish-documentation.yml [deleted file]
.github/workflows/release-please.yml

diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml
deleted file mode 100644 (file)
index 8692cf6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Publish documentation
-
-on:
-  workflow_dispatch:
-  workflow_call:
-
-jobs:
-  publish-documentation:
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-
-      - name: Setup pnpm
-        uses: pnpm/action-setup@v4
-
-      - name: Setup Node.js
-        uses: actions/setup-node@v4
-        with:
-          node-version: 20.x
-          cache: 'pnpm'
-
-      - name: Generate documentation
-        run: |
-          pnpm install --ignore-scripts --frozen-lockfile
-          pnpm typedoc
-
-      - name: Commit files
-        if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
-        env:
-          COMMIT_MESSAGE: 'docs: generate documentation'
-          COMMIT_AUTHOR: Documentation Bot
-          COMMIT_EMAIL: documentation-bot@users.noreply.github.com
-        run: |
-          git config --local user.name "${{ env.COMMIT_AUTHOR }}"
-          git config --local user.email "${{ env.COMMIT_EMAIL }}"
-          git pull
-          git add ./docs
-          git commit -a -m "${{ env.COMMIT_MESSAGE }}"
-
-      - name: Push changes
-        if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
-        uses: CasperWA/push-protected@v2
-        with:
-          token: ${{ secrets.GH_TOKEN_PROTECTED }}
-          branch: ${{ github.event.repository.default_branch }}
index 7aab40174e8b1fb95885f549d04502b5391bd487..f70ab97a67fba926b02a79a800a20a850b95d630 100644 (file)
@@ -129,5 +129,43 @@ jobs:
           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
 
   publish-documentation:
-    uses: ./.github/workflows/publish-documentation.yml
     needs: [publish-npm, publish-jsr]
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Setup pnpm
+        uses: pnpm/action-setup@v4
+
+      - name: Setup Node.js
+        uses: actions/setup-node@v4
+        with:
+          node-version: 20.x
+          cache: 'pnpm'
+
+      - name: Generate documentation
+        run: |
+          pnpm install --ignore-scripts --frozen-lockfile
+          pnpm typedoc
+
+      - name: Commit files
+        if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
+        env:
+          COMMIT_MESSAGE: 'docs: generate documentation'
+          COMMIT_AUTHOR: Documentation Bot
+          COMMIT_EMAIL: documentation-bot@users.noreply.github.com
+        run: |
+          git config --local user.name "${{ env.COMMIT_AUTHOR }}"
+          git config --local user.email "${{ env.COMMIT_EMAIL }}"
+          git pull
+          git add ./docs
+          git commit -a -m "${{ env.COMMIT_MESSAGE }}"
+
+      - name: Push changes
+        if: github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
+        uses: CasperWA/push-protected@v2
+        with:
+          token: ${{ secrets.GH_TOKEN_PROTECTED }}
+          branch: ${{ github.event.repository.default_branch }}