From 714f5ec9eb8dc594c8edb167cd8988716a1652c9 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:18:32 +0100 Subject: [PATCH 1/9] Update doc.yml --- .github/workflows/doc.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 76660343ca2..9fac51fb0ab 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -41,3 +41,27 @@ jobs: path: out/doc - name: Test run: NODE=$(command -v node) make test-doc-ci TEST_CI_ARGS="-p actions --measure-flakiness 9" + build-preview: + if: github.event.pull_request + needs: build-docs + runs-on: ubuntu-latest + steps: + - name: Check out the gh-pages branch + uses: actions/checkout@v3 + with: + persist-credentials: false + branch: gh-pages + - name: Download tarball from build job + uses: actions/download-artifact@v3 + with: + name: docs + path: ${{ github.event.pull_request.id }} + - name: Display structure of downloaded files + run: ls -R + - name: Commit the doc preview to gh-pages + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git add "${{ github.event.pull_request.id }}" + git commit -m "Add/Update preview for ${{ github.event.pull_request.url }}" -m "The preview will be available at https://nodejs.github.io/node/${{ github.event.pull_request.id }}/" + git push origin HEAD:gh-pages From 8cfb938b9f1d96486c1f4abdb72466292d27c9b4 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:20:05 +0100 Subject: [PATCH 2/9] Update assert.md --- doc/api/assert.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index d40300cc3fd..b01f135c187 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -32,9 +32,6 @@ changes: description: Added strict assertion mode to the assert module. --> -In strict assertion mode, non-strict methods behave like their corresponding -strict methods. For example, [`assert.deepEqual()`][] will behave like -[`assert.deepStrictEqual()`][]. In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error messages for objects display the objects, often truncated. From f07435015abe14e3f57e31f8e7ac8a181a0e7a7a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:27:02 +0100 Subject: [PATCH 3/9] Update doc.yml --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 9fac51fb0ab..ba6b79c69f9 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -50,7 +50,7 @@ jobs: uses: actions/checkout@v3 with: persist-credentials: false - branch: gh-pages + ref: gh-pages - name: Download tarball from build job uses: actions/download-artifact@v3 with: From 9c2eea5d21ce24d856d3ad48b874c4371a1d8eb6 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:38:44 +0100 Subject: [PATCH 4/9] Update doc.yml --- .github/workflows/doc.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index ba6b79c69f9..958a7004d91 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -49,19 +49,19 @@ jobs: - name: Check out the gh-pages branch uses: actions/checkout@v3 with: - persist-credentials: false + # We want to persist credentials so we can push to gh-pages ref: gh-pages - name: Download tarball from build job uses: actions/download-artifact@v3 with: name: docs - path: ${{ github.event.pull_request.id }} + path: ${{ github.event.pull_request.number }} - name: Display structure of downloaded files run: ls -R - name: Commit the doc preview to gh-pages run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - git add "${{ github.event.pull_request.id }}" - git commit -m "Add/Update preview for ${{ github.event.pull_request.url }}" -m "The preview will be available at https://nodejs.github.io/node/${{ github.event.pull_request.id }}/" + git add "${{ github.event.pull_request.number }}" + git commit -m "Add/Update preview for ${{ github.event.pull_request.html_url }}" -m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.repo.name }}/${{ github.event.pull_request.number }}/" git push origin HEAD:gh-pages From 294c8f3c1f457d6a7fae7776b94eef3cc8d9dbb5 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:49:24 +0100 Subject: [PATCH 5/9] Update doc.yml --- .github/workflows/doc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 958a7004d91..e62803302b6 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -45,6 +45,8 @@ jobs: if: github.event.pull_request needs: build-docs runs-on: ubuntu-latest + permission: + contents: read|write steps: - name: Check out the gh-pages branch uses: actions/checkout@v3 @@ -56,8 +58,6 @@ jobs: with: name: docs path: ${{ github.event.pull_request.number }} - - name: Display structure of downloaded files - run: ls -R - name: Commit the doc preview to gh-pages run: | git config --global user.email "actions@github.com" From 50de617dc834a52b5b4dff77e1e5b303958af907 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:51:40 +0100 Subject: [PATCH 6/9] Update doc.yml --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index e62803302b6..8d5632f98ef 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -45,7 +45,7 @@ jobs: if: github.event.pull_request needs: build-docs runs-on: ubuntu-latest - permission: + permissions: contents: read|write steps: - name: Check out the gh-pages branch From f4bf7efcf6af98abfcb82fdb8b7e67c9ceee48db Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 16:54:48 +0100 Subject: [PATCH 7/9] Update doc.yml --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 8d5632f98ef..5e02d17ec73 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -46,7 +46,7 @@ jobs: needs: build-docs runs-on: ubuntu-latest permissions: - contents: read|write + contents: write steps: - name: Check out the gh-pages branch uses: actions/checkout@v3 From 5e51835f1820dc3efa4f0960e2be2c77a6790016 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 17:05:39 +0100 Subject: [PATCH 8/9] Update doc.yml --- .github/workflows/doc.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 5e02d17ec73..6e9fc1ddd46 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -53,6 +53,8 @@ jobs: with: # We want to persist credentials so we can push to gh-pages ref: gh-pages + - name: Erase previous version (if it exists) + run: rm -rf "${{ github.event.pull_request.number }}" - name: Download tarball from build job uses: actions/download-artifact@v3 with: @@ -60,8 +62,9 @@ jobs: path: ${{ github.event.pull_request.number }} - name: Commit the doc preview to gh-pages run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" git add "${{ github.event.pull_request.number }}" - git commit -m "Add/Update preview for ${{ github.event.pull_request.html_url }}" -m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.repo.name }}/${{ github.event.pull_request.number }}/" + git commit \ + --author="Node.js GitHub Bot " + -m "Add/Update preview for ${{ github.event.pull_request.html_url }}" \ + -m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.base.repo.name }}/${{ github.event.pull_request.number }}/api/" git push origin HEAD:gh-pages From 0b4db7aecdbd26fc6fad83b926de2688990dd115 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Mar 2023 17:09:59 +0100 Subject: [PATCH 9/9] Update doc.yml --- .github/workflows/doc.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 6e9fc1ddd46..c9d2b312366 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -62,9 +62,10 @@ jobs: path: ${{ github.event.pull_request.number }} - name: Commit the doc preview to gh-pages run: | + git config user.email "github-bot@iojs.org" + git config user.name "Node.js GitHub Bot" git add "${{ github.event.pull_request.number }}" git commit \ - --author="Node.js GitHub Bot " -m "Add/Update preview for ${{ github.event.pull_request.html_url }}" \ -m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.base.repo.name }}/${{ github.event.pull_request.number }}/api/" git push origin HEAD:gh-pages