steps: install: image: node:20.19-alpine commands: - npm install when: event: - push - pull_request build: image: node:20.19-alpine commands: - npm run build when: event: - push - pull_request deploy: image: docker:latest volumes: - /var/run/docker.sock:/var/run/docker.sock commands: - docker build -t portfolio . - docker stop portfolio || true - docker rm portfolio || true - docker run -d -p 8080:8080 --name portfolio portfolio when: event: push branch: main