From 328e5e852fafe2a53470d095f2748346552c02e2 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Fri, 25 Nov 2022 15:41:26 +0330 Subject: [PATCH 1/2] checkout before deploy. --- .github/workflows/site.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index bef52ebf3fd4..f3037e8de6c3 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -6,6 +6,7 @@ env: NODE_OPTIONS: --max_old_space_size=6144 on: + pull_request: workflow_dispatch: inputs: publish: @@ -81,18 +82,24 @@ jobs: needs: [build] runs-on: ubuntu-20.04 steps: + - name: Checkout series/1.x Branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v3 with: name: website-artifact + path: website-artifact - name: Release to GitHub Pages - if: | - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/docs.')) || - (github.event_name == 'workflow_dispatch' && github.event.inputs.publish) +# if: | +# (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/docs.')) || +# (github.event_name == 'workflow_dispatch' && github.event.inputs.publish) uses: JamesIves/github-pages-deploy-action@v4.4.1 with: branch: gh-pages - folder: ./ + folder: ./website-artifact - name: Print All Generated Files - run: find ./ -print + run: find ./website-artifact -print From 31cb6aecd38adc8243e854edc878fd9cc208e35a Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Fri, 25 Nov 2022 16:56:23 +0330 Subject: [PATCH 2/2] remove on pull_request event trigger. --- .github/workflows/site.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index f3037e8de6c3..abfd3de07753 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -6,7 +6,6 @@ env: NODE_OPTIONS: --max_old_space_size=6144 on: - pull_request: workflow_dispatch: inputs: publish: @@ -93,9 +92,9 @@ jobs: path: website-artifact - name: Release to GitHub Pages -# if: | -# (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/docs.')) || -# (github.event_name == 'workflow_dispatch' && github.event.inputs.publish) + if: | + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/docs.')) || + (github.event_name == 'workflow_dispatch' && github.event.inputs.publish) uses: JamesIves/github-pages-deploy-action@v4.4.1 with: branch: gh-pages