40 lines
931 B
YAML
40 lines
931 B
YAML
name: Build and Deploy develop
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
builds:
|
|
runs-on: host
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm install
|
|
npm install -g @angular/cli
|
|
|
|
- name: Build Angular project
|
|
run: ng build --configuration=production
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build -t 192.168.2.28:5050/tusha-fe:latest .
|
|
|
|
- name: Push Docker image
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
run: |
|
|
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
|
|
docker push 192.168.2.28:5050/tusha-fe:latest
|
|
|