File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 : Build and deploy
16+ env :
17+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
18+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
19+ run : |
20+ docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
21+ echo "Building and pushing docker image"
22+ docker build -t $DOCKER_USERNAME/autoplan:latest .
23+ docker push $DOCKER_USERNAME/autoplan:latest
24+
25+ - name : Deploy to DigitalOcean
26+ uses : appleboy/ssh-action@master
27+ with :
28+ host : ${{ secrets.SEREVR_HOST }}
29+ username : ${{ secrets.SERVER_USERNAME }}
30+ key : ${{ secrets.SERVER_SSH_KEY }}
31+ port : ${{ secrets.SERVER_PORT }}
32+ script : |
33+ cd /opengeoworks
34+ docker compose pull autoplan
35+ docker compose up --build -d autoplan
You can’t perform that action at this time.
0 commit comments