Try specifying cache directories differently #416
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
| name: Render and deploy Quarto files | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| NEWSAPI_KEY: ${{ secrets.NEWSAPI_KEY }} | |
| GH_APP_ID: ${{ secrets.GH_APP_ID }} | |
| GH_APP_SECRET: ${{ secrets.GH_APP_SECRET }} | |
| GH_PAT_DEMO: ${{ secrets.GH_PAT_DEMO }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_PAT: ${{ secrets.GH_PAT }} | |
| GITHUB_PAT: ${{ secrets.GH_PAT }} | |
| RENV_CACHE: ~/.cache/renv | |
| PIP_CACHE: ~/.cache/pip | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Prepare cache directories so they always exist | |
| - name: Prepare cache dirs | |
| run: | | |
| mkdir -p ~/.cache/pip | |
| mkdir -p ~/.cache/renv | |
| # Cache Python packages | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('setup/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| # Cache R packages from renv | |
| - name: Cache R packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: renv | |
| key: ${{ runner.os }}-renv-${{ hashFiles('renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-renv- | |
| # Build Docker image | |
| - name: Build Docker image | |
| run: docker build -t local/quarto-reticulate:latest . | |
| # Run Docker container (optional test) | |
| - name: Test build inside container | |
| run: docker run --rm local/quarto-reticulate:latest |