Skip to content

13 - Using Caching

13 - Using Caching #3

Workflow file for this run

name: 13 - Using Caching
on:
workflow_dispatch:
inputs:
use-cache:
description: Whether to execute cache step
type: boolean
default: true
node-version:
description: Node version
type: choice
options:
- 18.x
- 20.x
- 21.x
default: 20.x
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 13-caching/react-app
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
- name: Install dependencies
run: npm ci
- name: Testing
run: npm run test
- name: Building
run: npm run build
- name: Deploying to nonprod
run: echo "Deploying to nonprod"