Update .gitea/workflows/first.yml
Some checks failed
Build & Deploy Frontend / build-push-deploy (push) Failing after 2m45s
Some checks failed
Build & Deploy Frontend / build-push-deploy (push) Failing after 2m45s
This commit is contained in:
parent
e5b9ea84e8
commit
2643cd4621
@ -1 +1,49 @@
|
|||||||
hello
|
name: Build & Deploy Frontend
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: erp-prod
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-push-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and Push Docker Image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./frontend
|
||||||
|
push: true
|
||||||
|
tags: naseeralisk786123/erp:latest
|
||||||
|
|
||||||
|
- name: Deploy to Dedicated Server
|
||||||
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.DEPLOY_HOST }}
|
||||||
|
username: ${{ secrets.DEPLOY_USER }}
|
||||||
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
script: |
|
||||||
|
docker pull naseeralisk786123/erp:latest
|
||||||
|
docker stop erp-container || true
|
||||||
|
docker rm erp-container || true
|
||||||
|
docker run -d \
|
||||||
|
--name erp-container \
|
||||||
|
-p 86:80 \
|
||||||
|
-p 446:443 \
|
||||||
|
naseeralisk786123/erp:latest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user