This is an automated email from the ASF dual-hosted git repository.

ricardozanini pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new d52ae5c39 ISSUE-580: Use default GH Action to publish guides (#581)
d52ae5c39 is described below

commit d52ae5c39da63717d44a1fd14ab9c7ec570947b6
Author: Ricardo Zanini <[email protected]>
AuthorDate: Tue Mar 12 12:32:49 2024 -0300

    ISSUE-580: Use default GH Action to publish guides (#581)
    
    Signed-off-by: Ricardo Zanini <[email protected]>
---
 .github/workflows/npm-publish-pages.yml | 36 +++++++++++++++++++++++++--------
 .github/workflows/sw-docs-pr.yml        |  4 ++--
 2 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/npm-publish-pages.yml 
b/.github/workflows/npm-publish-pages.yml
index 7a15dd7ac..88e7081a1 100644
--- a/.github/workflows/npm-publish-pages.yml
+++ b/.github/workflows/npm-publish-pages.yml
@@ -20,20 +20,34 @@
 # This workflow will run tests using node and then publish a package to GitHub 
Packages when a release is created
 # For more information see: 
https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
 
-name: Node.js Publish SonataFlow Docs
+name: Publish to GitHub Pages
 
 on:
   push:
     branches:
       - main
       - 1.*
+  # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
 
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
 permissions:
-  contents: write
+  contents: read
+  pages: write
+  id-token: write
+
+# Allow only one concurrent deployment, skipping runs queued between the run 
in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production 
deployments to complete.
+concurrency:
+  group: "pages"
+  cancel-in-progress: false
 
 jobs:
   build:
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+
     runs-on: ubuntu-latest
 
     strategy:
@@ -43,12 +57,12 @@ jobs:
 
     steps:
       - name: Checkout main branch
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           ref: main
 
       - name: Use Node.js ${{ matrix.node-version }}
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node-version }}
 
@@ -63,8 +77,14 @@ jobs:
       - name: Copy latest to numbered version
         run: python scripts/copy-latest.py
 
-      - name: Publish to GitHub Pages
-        uses: peaceiris/actions-gh-pages@v3
+      - name: Setup Pages
+        uses: actions/configure-pages@v4
+
+      - name: Upload artifact
+        uses: actions/upload-pages-artifact@v3
         with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_dir: build/site
+          path: build/site
+
+      - name: Deploy to GitHub Pages
+        id: deployment
+        uses: actions/deploy-pages@v4
diff --git a/.github/workflows/sw-docs-pr.yml b/.github/workflows/sw-docs-pr.yml
index 0cbdc45cd..c541ad48d 100644
--- a/.github/workflows/sw-docs-pr.yml
+++ b/.github/workflows/sw-docs-pr.yml
@@ -33,8 +33,8 @@ jobs:
     name: "Building SonataFlow Docs with Antora"
     runs-on: [ubuntu-latest]
     steps:
-      - uses: actions/checkout@v3
-      - uses: actions/setup-node@v3
+      - uses: actions/checkout@v4
+      - uses: actions/setup-node@v4
         with:
           node-version: "16"
       - run: export DOCSEARCH_ENABLED=true


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to