Skip to content

Merge pull request #3 from Neihouse/pre-commit-ci-update-config #7

Merge pull request #3 from Neihouse/pre-commit-ci-update-config

Merge pull request #3 from Neihouse/pre-commit-ci-update-config #7

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