Skip to content

Update UI (#34)

Update UI (#34) #30

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: ci-pipeline-for-prod
on:
push:
branches:
- prod
jobs:
CI_Pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Remove old env
run: rm -f .env
- name: Create .env file
uses: ozaytsev86/create-env-file@v1
with:
ENV_VITE_WS_URI: ${{ secrets.PROD_WS_URI }}
ENV_VITE_FE_URL: ${{ secrets.PROD_FE_URL }}
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/gbp_fe:prod
- name: Push to Docker Hub
run: docker push ${{ secrets.DOCKER_USERNAME }}/gbp_fe:prod
Deploy:
runs-on: self-hosted
needs: CI_Pipeline
steps:
- name: Deploy
working-directory: /opt/GBP_deploy_dev
run: |
docker rm -f gbp_fe
docker-compose pull gbp_fe
docker-compose up -d
docker system prune -f