Skip to content

Deploy Shinylive App to GitHub Pages #4

Deploy Shinylive App to GitHub Pages

Deploy Shinylive App to GitHub Pages #4

Workflow file for this run

name: Deploy Shinylive App to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install R packages
run: |
install.packages(c("shinylive", "shiny"))
shell: Rscript {0}
- name: Export shinylive app
run: |
shinylive::export(".", "site")
shell: Rscript {0}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4