Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jthompson-arcus committed Apr 23, 2024
1 parent 1619e2b commit 4658c02
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/write-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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-pandoc@v2

- 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(c("rsconnect"))'

- name: Create manifest.json
shell: Rscript {0}
run: |
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"

0 comments on commit 4658c02

Please sign in to comment.