feat: implement Docker-based deployment and update environment configuration
Some checks failed
/ build-push (push) Has been cancelled
Some checks failed
/ build-push (push) Has been cancelled
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
name: Deploy Angular via SSH
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install and Build
|
||||
run: |
|
||||
npm install --legacy-peer-deps
|
||||
npm run build -- --prod
|
||||
|
||||
- name: Transferir arquivos via SCP
|
||||
uses: https://github.com/appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.REMOTE_HOST }}
|
||||
username: ${{ secrets.REMOTE_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
source: "dist/"
|
||||
target: "/var/www/html/vendaweb-frontend"
|
||||
strip_components: 1
|
||||
|
||||
- name: Reiniciar Nginx Remoto
|
||||
uses: https://github.com/appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.REMOTE_HOST }}
|
||||
username: ${{ secrets.REMOTE_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
sudo systemctl reload nginx
|
||||
14
.gitea/workflows/deploy.yaml
Normal file
14
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
on: [push]
|
||||
jobs:
|
||||
build-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Login Harbor
|
||||
run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
||||
- name: Build/Push
|
||||
run: |
|
||||
docker build -t 172.35.0.216/library/vendaweb-portal:latest .
|
||||
docker push 172.35.0.216/library/vendaweb-portal:latest
|
||||
- name: Webhook Portainer
|
||||
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONT }}"
|
||||
Reference in New Issue
Block a user