Skip to content

add cd.yml

add cd.yml #4

Workflow file for this run

name: React next.js CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 22
- name: Build Docker image
run: docker build -t chowsyzzz/sample-app .
- name: Run tests
run: echo "Put your testing command here if you have"
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: docker image push chowsyzzz/sample-app