Skip to content

[pre-commit.ci] pre-commit autoupdate #5

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #5

Workflow file for this run

name: Node.js CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js \${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: \${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm test
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Build and push Docker image
run: |
docker build -t my-app:latest .
# Add steps to push the Docker image to a registry
# Add steps to deploy the Docker image to a hosting service