diff --git a/.github/workflows/deploy-book.yaml b/.github/workflows/deploy-book.yaml index 583be77..9520980 100644 --- a/.github/workflows/deploy-book.yaml +++ b/.github/workflows/deploy-book.yaml @@ -24,7 +24,7 @@ on: default: 'None' # This is just a flag for whether to ignore this input type: string publish_dir: - description: 'Publish dir for the peaceiris/actions-gh-pages action' + description: 'Publish dir for the action' required: false default: '_build/html' type: string @@ -60,26 +60,26 @@ jobs: rm -f book.zip - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4.0.0 + uses: JamesIves/github-pages-deploy-action@v4 if: | - (github.ref == 'refs/heads/main' - && inputs.cname == 'None') + (github.ref == 'refs/heads/main' && inputs.cname == 'None') with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ inputs.publish_dir }} - enable_jekyll: false - keep_files: true # This preserves existing previews from open PRs - destination_dir: ${{ inputs.destination_dir }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: ${{ inputs.publish_dir }} + CLEAN: true + KEEP_HISTORY: false + BASE_PATH: ${{ inputs.destination_dir }} - name: Deploy to GitHub Pages with custom domain - uses: peaceiris/actions-gh-pages@v4.0.0 + uses: JamesIves/github-pages-deploy-action@v4 if: | - (github.ref == 'refs/heads/main' - && inputs.cname != 'None') + (github.ref == 'refs/heads/main' && inputs.cname != 'None') with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ inputs.publish_dir }} - enable_jekyll: false - keep_files: true # This preserves existing previews from open PRs - destination_dir: ${{ inputs.destination_dir }} - cname: ${{ inputs.cname }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: ${{ inputs.publish_dir }} + CLEAN: true + KEEP_HISTORY: false + BASE_PATH: ${{ inputs.destination_dir }} + CNAME: ${{ inputs.cname }}