feat: Add Docker workflows for building, testing, and deploying the application; include Dockerfile for image creation
This commit is contained in:
21
.gitea/workflows/deploy.yml
Normal file
21
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Deploy to Server
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: SSH and deploy
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
docker pull ${{ secrets.GITEA_REGISTRY }}/${{ secrets.GITEA_USERNAME }}/calminer:latest
|
||||
docker stop calminer || true
|
||||
docker rm calminer || true
|
||||
docker run -d --name calminer -p 8000:8000 ${{ secrets.GITEA_REGISTRY }}/${{ secrets.GITEA_USERNAME }}/calminer:latest
|
||||
Reference in New Issue
Block a user