Create master.yml
This commit is contained in:
parent
865af0715e
commit
88fd363c1c
26
.github/workflows/master.yml
vendored
Normal file
26
.github/workflows/master.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: CI/CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master # 监视的分支
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Deploy to Server
|
||||
uses: appleboy/ssh-action@v0.1.5
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
cd /data/portainer/itfx
|
||||
git pull origin master
|
||||
docker build -t interfaceforward_api:latest -f src/InterfaceForward.Api/Dockerfile .
|
||||
docker service update --force --image interfaceforward_api:latest itfx_interfaceforward_api
|
||||
|
||||
Loading…
Reference in New Issue
Block a user