Skip to content

Genera release con el build del paso anterior con debug #35

Genera release con el build del paso anterior con debug

Genera release con el build del paso anterior con debug #35

Workflow file for this run

name: Web pipeline
on:
push:
branches:
- new-web
path:
- .github/workflows/web.yml
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout código fuente
uses: actions/checkout@v2
- name: Configurar Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Instalar dependencias
run: npm install
working-directory: ./web
- name: Ejecutar los test
run: npm run test
working-directory: ./web
- name: Guardar caché de node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout código fuente
uses: actions/checkout@v2
- name: Configurar Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Compilar la aplicación
run: |
npm install
npm run build
working-directory: ./web
- name: Publicar artefactos
uses: actions/upload-artifact@v2
with:
name: build
path: web/build
- name: Listar contenido del directorio de construcción
run: ls -R web/build
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout código fuente
uses: actions/checkout@v2
- name: Listar contenido del directorio de construcción
run: ls -R ${{ github.workspace }}/web/build
- name: Crear etiqueta y release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/web/build
tag_name: v1.0.0-${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ssh-connect:
# runs-on: ubuntu-latest
# needs: release
# steps:
# - name: Checkout código fuente
# uses: actions/checkout@v2
#
# - name: Conectar a servidor SSH
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USERNAME }}
# password: ${{ secrets.SSH_PASSWORD }}
# script: |
# # Comandos SSH que deseas ejecutar en el servidor remoto
# echo "Conexión SSH exitosa"