Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cache restore and save

name: Save and Restore

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: Build
    steps:
      - uses: actions/checkout@v3

      - uses: actions/cache/restore@v3
        id: restore
        with:
          path: data/
          key: ${{ github.ref }}
          #fail-on-cache-miss: False


      - name: Pretend to add more data...
        run: |
          mkdir -p data
          date >> data/time.txt
          cat data/time.txt

      - uses: actions/cache/save@v3
        id: save
        with:
          path: data/
          key: ${{ github.ref }}