-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1619e2b
commit 4658c02
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |