Skip to content

Commit

Permalink
ci: trying with default actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Jan 7, 2025
1 parent 32ce7c4 commit b3a17a8
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions .github/workflows/shinylive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,16 @@ name: Shinylive GA

permissions: read-all

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

jobs:
shinylive:
# Build job
build:
# Specify runner + build & upload the static files as an artifact
runs-on: ubuntu-latest

name: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

strategy:
fail-fast: false

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

Expand All @@ -40,9 +32,30 @@ jobs:
- name: Run shinylive
run: Rscript -e 'shinylive::export(".", "_site")'

- name: Deploy to GitHub Pages
- name: Upload static files as artifact
id: deployment
uses: actions/deploy-pages@v4
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
name: github-pages
path: ./_site
path: _site/

# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

0 comments on commit b3a17a8

Please sign in to comment.