From b3a17a872b3dd48e7f93e613023d6a8a68e4dd3d Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 7 Jan 2025 09:07:57 +0100 Subject: [PATCH] ci: trying with default actions --- .github/workflows/shinylive.yaml | 51 ++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/shinylive.yaml b/.github/workflows/shinylive.yaml index e1f55f5..b611080 100644 --- a/.github/workflows/shinylive.yaml +++ b/.github/workflows/shinylive.yaml @@ -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 @@ -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 \ No newline at end of file + 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