Add Readme File #5
This file contains hidden or 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: production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout código | |
uses: actions/checkout@v3 | |
- name: Configurar Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Instalar dependencias | |
run: npm install | |
- name: Ejecutar build | |
run: npm run build | |
- name: Docker login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Construir imagen y subir a Docker Hub | |
run: | | |
docker build -t ${{ secrets.DOCKER_USERNAME }}/codegeekerylink:latest . | |
docker push ${{ secrets.DOCKER_USERNAME }}/codegeekerylink:latest |