Skip to content

Commit 28fde27

Browse files
authored
Merge pull request #125 from jukent/preview
Swap PR preview action
2 parents 443dc73 + f65642b commit 28fde27

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Diff for: .github/workflows/deploy-book.yaml

+18-18
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
default: 'None' # This is just a flag for whether to ignore this input
2525
type: string
2626
publish_dir:
27-
description: 'Publish dir for the peaceiris/actions-gh-pages action'
27+
description: 'Publish dir for the action'
2828
required: false
2929
default: '_build/html'
3030
type: string
@@ -60,26 +60,26 @@ jobs:
6060
rm -f book.zip
6161
6262
- name: Deploy to GitHub Pages
63-
uses: peaceiris/actions-gh-pages@v4.0.0
63+
uses: JamesIves/github-pages-deploy-action@v4
6464
if: |
65-
(github.ref == 'refs/heads/main'
66-
&& inputs.cname == 'None')
65+
(github.ref == 'refs/heads/main' && inputs.cname == 'None')
6766
with:
68-
github_token: ${{ secrets.GITHUB_TOKEN }}
69-
publish_dir: ${{ inputs.publish_dir }}
70-
enable_jekyll: false
71-
keep_files: true # This preserves existing previews from open PRs
72-
destination_dir: ${{ inputs.destination_dir }}
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
BRANCH: gh-pages
69+
FOLDER: ${{ inputs.publish_dir }}
70+
CLEAN: true
71+
KEEP_HISTORY: false
72+
BASE_PATH: ${{ inputs.destination_dir }}
7373

7474
- name: Deploy to GitHub Pages with custom domain
75-
uses: peaceiris/actions-gh-pages@v4.0.0
75+
uses: JamesIves/github-pages-deploy-action@v4
7676
if: |
77-
(github.ref == 'refs/heads/main'
78-
&& inputs.cname != 'None')
77+
(github.ref == 'refs/heads/main' && inputs.cname != 'None')
7978
with:
80-
github_token: ${{ secrets.GITHUB_TOKEN }}
81-
publish_dir: ${{ inputs.publish_dir }}
82-
enable_jekyll: false
83-
keep_files: true # This preserves existing previews from open PRs
84-
destination_dir: ${{ inputs.destination_dir }}
85-
cname: ${{ inputs.cname }}
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
BRANCH: gh-pages
81+
FOLDER: ${{ inputs.publish_dir }}
82+
CLEAN: true
83+
KEEP_HISTORY: false
84+
BASE_PATH: ${{ inputs.destination_dir }}
85+
CNAME: ${{ inputs.cname }}

0 commit comments

Comments
 (0)