diff --git a/.github/workflows/deploy-app.yaml b/.github/workflows/deploy-app.yaml new file mode 100644 index 0000000..67df8d8 --- /dev/null +++ b/.github/workflows/deploy-app.yaml @@ -0,0 +1,65 @@ +--- +name: Deploy app + +on: + push: + branches: + - "main" + workflow_dispatch: + +permissions: + actions: write + checks: write + contents: write + deployments: write + id-token: write + issues: read + discussions: read + packages: write + pages: write + pull-requests: read + repository-projects: read + security-events: read + statuses: read + +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: rstudio/shiny-workflows/setup-r-package@v1 + with: + packages: | + renv + shinylive + sessioninfo + + - name: Install package + run: | + install.packages("tima", repos = c("https://taxonomicallyinformedannotation.r-universe.dev", "https://bioc.r-universe.dev", "https://cloud.r-project.org")) + tima::install() + shell: Rscript {0} + + - name: Build site + shell: Rscript {0} + run: | + shinylive::export(system.file(package = "tima"), "site") + + - name: Upload site artifact + if: github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: "site" + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.6.3 + with: + clean: false + branch: gh-pages + folder: site