This file contains 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: Build and deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
working-directory: ./server | ||
uses: actions/setup-node@v2 | ||
Check failure on line 21 in .github/workflows/build.yml GitHub Actions / Build and deployInvalid workflow file
|
||
with: | ||
node-version: '20' | ||
- name: Cache server dependencies | ||
working-directory: ./server | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/server/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
working-directory: ./server | ||
run: npm install | ||
- name: Generate Prisma Client | ||
working-directory: ./server | ||
run: npx prisma generate | ||
- name: Run tests | ||
working-directory: ./server | ||
run: npm test | ||
- name: Build | ||
working-directory: ./server | ||
run: npm run build |