Added Kachina, Mualani and Kinich #36
Workflow file for this run
This file contains 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
# 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: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
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@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/gbp_fe:${{ github.ref_name }} | |
${{ 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 |