Revert docs CICD trigger on push to main instead of tag-based (#698)
Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
parent
37d8ae3d31
commit
7b39ad6e8d
6
.github/workflows/jan-docs.yml
vendored
6
.github/workflows/jan-docs.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+-docs"]
|
- '.github/workflows/jan-docs.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@ -78,13 +78,13 @@ jobs:
|
|||||||
Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
|
Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
|
||||||
|
|
||||||
- name: Add Custome Domain file
|
- 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
|
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME
|
||||||
|
|
||||||
# Popular action to deploy to GitHub Pages:
|
# Popular action to deploy to GitHub Pages:
|
||||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||||
- name: Deploy to GitHub Pages
|
- 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
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user