Cleanly push directory contents to a branch
OTHER License
Cleanly push directory contents to a branch. Particularly useful for gh-pages
deployment.
steps:
- uses: actions/checkout@v3
- run: build_site_command --output-dir static_site
- uses: casperdcl/push-dir@v1
with:
message: update static site
branch: gh-pages
dir: static_site
history: false
cname: my.domain.com
nojekyll: true
Perfect for e.g. gh-pages
deployment.
uses: casperdcl/push-dir@
67a9d1d)The main alternatives GitHub Actions gh-pages-deploy and github-push currently do not offer the benefits above.
Other features (supported by some of the alternatives) include:
CNAME
& .nojekyll
conveniences for GitHub pagesmessage:
description: Commit message
required: true
branch:
description: Branch to push to
required: true
dir:
description: Directory to push
default: .
required: false
force:
description: Set to "true" to force push
required: false
history:
description: |
Set to "false" to discard any prior commits on the `branch`
(Note: "false" will override `force` to "true")
default: true
required: false
cname:
description: Text to inject into a `CNAME` file
default: ''
required: false
nojekyll:
description: Set to "true" to add a `.nojekyll` file
required: false
name:
description: Git committer name
required: false
email:
description: Git committer email
required: false