-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses the keep_files flag to ensure that the main merge does not clobb…
…er the previews
- Loading branch information
1 parent
8fd57de
commit 9a978ae
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,21 +39,21 @@ jobs: | |
number: ${{ github.event.number }} | ||
id: deploy-preview | ||
message: "Starting deployment of preview ⏳..." | ||
- name: Deploy to GitHub Pages | ||
- name: Build PR preview website | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
if: github.ref != 'refs/heads/main' | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _build/ | ||
# force_orphan: true # TODO -- determine whether this is the right approach | ||
- name: Build PR preview website | ||
destination_dir: ${{ env.PR_PATH }} # TODO you need to set this if you're using a custom domain. Otherwise you can remove it. | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref != 'refs/heads/main' | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _build/ | ||
destination_dir: ${{ env.PR_PATH }} # TODO you need to set this if you're using a custom domain. Otherwise you can remove it. | ||
keep_files: true # Add this line to keep existing files in the gh-pages branch | ||
- name: Update comment | ||
uses: hasura/[email protected] | ||
if: github.ref != 'refs/heads/main' | ||
|