π GitHub Action to deploy a directory to a remote Git branch. See demo.
Note
If you see the error:
remote: Permission to ... denied to ....
fatal: unable to access 'https://github.com/...': The requested URL returned error: 403
Enable Settings > Actions > General > Workflow permissions > Read and write permissions
# .github/workflows/deploy.yml
on: push
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# insert build step
# ...
- name: Deploy to GitHub Pages
uses: remarkablemark/gitploy-action@v1
with:
directory: build
Commit and push dist
to the remote gh-pages
branch:
- uses: remarkablemark/gitploy-action@v1
with:
directory: dist
branch: gh-pages
See action.yml
Required: The directory of the build files.
- uses: remarkablemark/gitploy-action@v1
with:
directory: build
Optional: The remote Git branch to deploy to. Defaults to gh-pages
:
- uses: remarkablemark/gitploy-action@v1
with:
directory: build
branch: gh-pages
Optional: The GitHub token. Defaults to GITHUB_TOKEN
:
- uses: remarkablemark/gitploy-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}