Skip to content

Commit

Permalink
Revert docs CICD trigger on push to main instead of tag-based (janhq#698
Browse files Browse the repository at this point in the history
)

Co-authored-by: Hien To <[email protected]>
  • Loading branch information
hiento09 and hientominh authored Nov 23, 2023
1 parent 37d8ae3 commit 7b39ad6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/jan-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 7b39ad6

Please sign in to comment.