Render-dashboard #34425
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| schedule: | |
| - cron: '58 * * * *' | |
| workflow_dispatch: | |
| name: Render-dashboard | |
| jobs: | |
| dashboarddown: | |
| name: Render-dashboard | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/quarto-dev/quarto-full:latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # Manual caching step since setup-renv doesn't get the cache as expected | |
| # when using renv+pak. | |
| # See https://github.com/r-lib/actions/issues/1085. | |
| - name: Cache packages | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.cache/R/renv | |
| key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-renv- | |
| - uses: r-lib/actions/setup-renv@v2 | |
| env: | |
| RENV_CONFIG_PAK_ENABLED: "true" | |
| - uses: quarto-dev/quarto-actions/render@v2 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ./_site | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: latest-waitinglist-data | |
| retention-days: 5 | |
| path: cran-incoming-*.csv | |
| # Deployment job | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: dashboarddown | |
| # 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 | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |
| save-history: | |
| if: github.event_name != 'pull_request' | |
| needs: dashboarddown | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: history | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: latest-waitinglist-data | |
| - name: Commit historical data | |
| run: | | |
| git config user.email "actions@github.com" | |
| git config user.name "GitHub Actions" | |
| git add cran-incoming-*.csv | |
| git commit -m 'new data' | |
| git pull --rebase | |
| git push | |
| echo "pushed to github" | |
| open-issue: | |
| needs: [dashboarddown, save-history] | |
| if: failure() && github.event_name == 'schedule' | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - run: gh issue reopen 53 |