GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site with Static Site Generators peaceiris/actions-gh-pages
This is a GitHub Action to deploy your static files to GitHub Pages. This deploy action can be combined simply and freely with Static Site Generators (Hugo, mdBook, MkDocs, Gatsby, GitBook, etc.).
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public
The above example step will deploy ./public
directory to gh-pages
branch.
Here is an example workflow for Hugo project.
Creat YAML file .github/workflows/gh-pages.yml
and push to your remote default branch.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public
Keyboard Shortcuts
Command | Function |
---|---|
? (Shift+/) | Bring up this help modal |
g+h | Go to Home |
g+p | Go to Posts |
g+e | Open Editor page on GitHub in a new tab |
g+s | Open Source page on GitHub in a new tab |
r | Reload page |