Description Usage Arguments Functions GitHub Pages RSync Netlify Google Firebase See Also
Create an (action) step to deploy static assets
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.