Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add write-manifest.yaml #767

Merged
merged 8 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/write-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Workflow derived from https://solutions.posit.co/operations/deploy-methods/ci-cd/github-actions/#overview-of-deploying-to-connect

name: write-manifest
on:
pull_request:
branches: [master]

jobs:
write-manifest:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- 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")'

- 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 "[email protected]"
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"
Loading