Skip to content

Add workflow for manifest.json #8

Add workflow for manifest.json

Add workflow for manifest.json #8

Workflow file for this run

# Workflow derived from https://solutions.posit.co/operations/deploy-methods/ci-cd/github-actions/#overview-of-deploying-to-connect
name: write-manifest
on:
push:
branches: [dev]
pull_request:
branches: [dev]
jobs:
write-manifest:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'renv'
use-public-rspm: true
- uses: r-lib/actions/setup-renv@v2
- name: Install required packages
run: Rscript -e 'install.packages("rsconnect", repos = "https://cran.rstudio.com")'
- name: Create manifest.json
run: Rscript -e 'rsconnect::writeManifest()'
- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add manifest.json || echo "WARN: manifest.json was not updated"
git commit -m 'Re-build manifest file' || echo "No changes to commit"
git push origin || echo "No changes to commit"