File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Production DigitalOcean Deploy
2+ on :
3+ push :
4+ branches :
5+ - main
6+
7+ jobs :
8+ build-and-deploy :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout Repository
13+ uses : actions/checkout@v3
14+
15+ - name : Log in to Docker Hub
16+ uses : docker/login-action@v2
17+ with :
18+ username : ${{ secrets.DOCKER_USERNAME }}
19+ password : ${{ secrets.DOCKER_PASSWORD }}
20+
21+ - name : Build and push image
22+ env :
23+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
24+ run : |
25+ echo "Building and pushing docker image"
26+ docker build -t $DOCKER_USERNAME/autoplan-python:latest .
27+ docker push $DOCKER_USERNAME/autoplan-python:latest
28+
29+ - name : Deploy to DigitalOcean
30+ uses : appleboy/ssh-action@master
31+ with :
32+ host : ${{ secrets.SEREVR_HOST }}
33+ username : ${{ secrets.SERVER_USERNAME }}
34+ key : ${{ secrets.SERVER_SSH_KEY }}
35+ port : ${{ secrets.SERVER_PORT }}
36+ script : |
37+ cd /opengeoworks
38+ docker compose pull autoplan-python
39+ docker compose up --build -d autoplan-python
You can’t perform that action at this time.
0 commit comments