Create an (action) step to deploy static assets
ghpages( src = "$DEPLOY_PATH", name = "Deploy to GitHub Pages", `if` = "github.ref == 'refs/heads/master'", ... ) rsync( src = "$DEPLOY_PATH", name = "Deploy via RSync", `if` = "github.ref == 'refs/heads/master'", HOST_NAME, HOST_IP, HOST_FINGERPRINT, user, dest, env = NULL, with = NULL, ... ) netlify( src = "$DEPLOY_PATH", name = "Deploy to Netlify", `if` = "github.ref == 'refs/heads/master'", prod = TRUE, with = NULL, env = NULL, site, ... ) firebase( name = "Deploy to Firebase", `if` = "github.ref == 'refs/heads/master'", PROJECT_ID = NULL, with = NULL, env = NULL, ... )
src |
|
---|---|
name |
|
if |
|
... | Arguments passed on to
|
HOST_NAME |
|
HOST_IP |
|
HOST_FINGERPRINT |
|
user |
|
dest |
|
env |
|
with |
|
prod |
|
site |
|
PROJECT_ID |
|
ghpages
: Wraps the external ghpages action to deploy to GitHub Pages.
rsync
: Wraps the external rsync action to deploy via Rsync over SSH.
netlify
: Wraps the external netlify cli action to deploy to Netlify.
firebase
: Wraps the external Google Firebase CLI action to deploy to Google Firebase.
Remember to provide a GitHub personal access token secret named GH_PAT
to the GitHub UI.
Set up a new PAT.
You can use usethis::browse_github_pat()
to get to the right page.
Remember that this PAT is not for your local machine, but for GitHub actions.
Copy the PAT to your clipboard.
Go to the settings of your repository, and paste the PAT as a secret.
The secret must be called GH_PAT
.
Remember to provide SSH_PRIVATE_KEY
and SSH_PUBLIC_KEY
as secrets to the GitHub UI..
Remember to provide NETLIFY_AUTH_TOKEN
and NETLIFY_SITE_ID
(optional) as secrets to the GitHub UI.
Remember to provide FIREBASE_TOKEN
as a secret to the GitHub UI.
Configuration details other than PROJECT_ID
are read from the firebase.json
at the root of your repository.
Because firebase gets the deploy directory from a firebase.json
file, it cannot use $DEPLOY_DIR
.
Manually edit your firebase.json
to provide the deploy path.
Other steps:
checkout()
,
install_deps()
,
pkg_dev
,
rscript()