Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix validateTime to take care of the case of having only periods #61

fix validateTime to take care of the case of having only periods

fix validateTime to take care of the case of having only periods #61

# Workflow for cleaning up deployed Shiny apps after PR closure
name: Shiny PR 3 Cleanup
on:
pull_request_target:
types: [closed]
jobs:
cleanup-pr:
runs-on: ubuntu-24.04
if: contains(github.event.pull_request.labels.*.name, 'DEPLOY')
permissions:
pull-requests: write
steps:
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Delete app
env:
SHINY_APP_NAME: ${{ vars.SHINY_APP_NAME }}_PR_${{ github.event.pull_request.number }}
run: |
install.packages("rsconnect")
rsconnect::setAccountInfo("${{ vars.SHINY_ACCOUNT }}", "${{ secrets.SHINY_TOKEN }}", "${{ secrets.SHINY_SECRET }}")
rsconnect::terminateApp(appName = "${{ env.SHINY_APP_NAME }}", account = "${{ vars.SHINY_ACCOUNT }}")
rsconnect::purgeApp(appName = "${{ env.SHINY_APP_NAME }}", account = "${{ vars.SHINY_ACCOUNT }}")
shell: Rscript {0}
- name: Remove DEPLOY label
if: always() # even if previous step fails
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'DEPLOY'
});
} catch (e) {
console.log("Label `DEPLOY` not found, skipping removal.");
}