Docs publish to github page trigger on push to docs branch (#1782)
Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
parent
c2310ed030
commit
f0e88d6213
6
.github/workflows/jan-docs.yml
vendored
6
.github/workflows/jan-docs.yml
vendored
@ -5,6 +5,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
|
- docs
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- '.github/workflows/jan-docs.yml'
|
- '.github/workflows/jan-docs.yml'
|
||||||
@ -12,6 +13,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
|
- docs
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- '.github/workflows/jan-docs.yml'
|
- '.github/workflows/jan-docs.yml'
|
||||||
@ -91,13 +93,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' && github.ref == 'refs/heads/main' && github.event.pull_request.head.repo.full_name != github.repository
|
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && 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' && github.ref == 'refs/heads/main' && github.event.pull_request.head.repo.full_name != github.repository
|
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && 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