From 7b39ad6e8ddf09570c8fa79bad7f88575ae3f1b3 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Thu, 23 Nov 2023 09:36:52 +0700 Subject: [PATCH] Revert docs CICD trigger on push to main instead of tag-based (#698) Co-authored-by: Hien To --- .github/workflows/jan-docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jan-docs.yml b/.github/workflows/jan-docs.yml index 2993d1525..e0b496b35 100644 --- a/.github/workflows/jan-docs.yml +++ b/.github/workflows/jan-docs.yml @@ -6,7 +6,7 @@ on: - main paths: - 'docs/**' - tags: ["v[0-9]+.[0-9]+.[0-9]+-docs"] + - '.github/workflows/jan-docs.yml' pull_request: branches: - main @@ -78,13 +78,13 @@ jobs: Preview URL: ${{ steps.deployCloudflarePages.outputs.url }} - name: Add Custome Domain file - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME # Popular action to deploy to GitHub Pages: # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - name: Deploy to GitHub Pages - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }}