Skip to content

Force Redeploy from gh-pages #2

Force Redeploy from gh-pages

Force Redeploy from gh-pages #2

Workflow file for this run

name: Force Redeploy from gh-pages
on:
push:
branches:
- gh-pages
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Force Modify All Files
run: |
find . -type f -exec sh -c 'echo "" >> {}' \;
- name: Commit and Push Changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -u
git commit -m "Force redeploy from gh-pages" || echo "No changes to commit"
git push origin gh-pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: . # Assuming the root directory is the publish directory