| name | deploy-teal-app |
| description | Write Teal app code from cowork artifact to files and push to GitHub. |
Deploy Teal App
What to do
Write app.R and data.R from the previous step's artifact, then push to GitHub. That's it.
Inputs
Read from previous step outputs (available in your context as workflow variables):
build-app.appCode — R code for app.R
build-app.dataCode — R code for data.R
build-app.modules — list of modules (for commit message)
build-app.summary — app description (for commit message)
define-requirements.githubRepo — target repo (e.g. filipstachura/tealflow-demo-app)
Steps
1. Write files
mkdir -p /output/app
Write the appCode content to /output/app/app.R.
Write the dataCode content to /output/app/data.R.
2. Push to GitHub
cd /output/app
git init
git checkout -b main
git add app.R data.R
git commit -m "feat: Teal app generated by TealFlow"
git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/REPO.git"
git push -u origin main --force
Replace REPO with the value from define-requirements.githubRepo.
3. Return result
Return the GitHub repo URL as your result.
Rules
- Do NOT download datasets. Do NOT set up renv. Do NOT validate the app. Just write files and push.
- Do NOT modify the code from the artifact.
- If GITHUB_TOKEN is missing, write the files and report that push was skipped.