added automatic deploy workflow with Gitea CI Actions

This commit is contained in:
Bryan Joshua Pedini 2024-08-21 22:02:01 +02:00
parent 1089dbe767
commit 123a090491

View File

@ -0,0 +1,27 @@
---
name: Deploy website on production server when committing on main
concurrency: 1
on:
push:
branches:
- main
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo "${{ secrets.SSH_PRIVATE_KEY }}" > /private.key
- run: chmod 600 /private.key
- uses: actions/checkout@v4
- run: APP_VERSION=latest make
- run: |
SSH_PRIVATE_KEY=/private.key
SSH_USERNAME=${{ secrets.SSH_USERNAME }}
DEPLOYMENT_HOST=${{ secrets.DEPLOYMENT_HOST }}
DEPLOYMENT_PATH=${{ secrets.DEPLOYMENT_PATH }}
make deploy