Skip to content

Commit

Permalink
add ghp preview
Browse files Browse the repository at this point in the history
  • Loading branch information
mahf708 committed Sep 29, 2023
1 parent a746149 commit cb0e833
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/e3sm-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ jobs:
# build every time (PR or push to master)
- name: Build
run: mkdocs build --strict --verbose
# deploy only when it is a push
# Only deploy to the main github page when there is a push to master
- if: ${{ github.event_name == 'push' }}
name: Deploy
run: mkdocs gh-deploy
name: GitHub Pages action
uses: JamesIves/github-pages-deploy-action@v4
with:
# Do not remove existing pr-preview pages
clean-exclude: pr-preview
folder: ./site/
# If it's a PR from within the same repo, deploy to a preview page
# For security reasons, PRs from forks cannot write into gh-pages for now
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
name: Preview docs
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/

0 comments on commit cb0e833

Please sign in to comment.