-
Notifications
You must be signed in to change notification settings - Fork 61
36 lines (34 loc) · 1.25 KB
/
deploy-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy CI
on:
workflow_run:
workflows: [Docker Image CI]
types:
- completed
# on:
# push:
# branches:
# - ci
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to remote server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
password: ${{ secrets.REMOTE_PASSWORD }}
port: ${{ secrets.REMOTE_PORT }}
command_timeout: 30m
script: |
cd ~ && sh ${{ secrets.DEPLOY_FILE }}
# docker login ghcr.io -u rookie-luochao -p ${{ secrets.GHCR_TOKEN }}
# echo "---------docker login success--------"
# docker pull ghcr.io/rookie-luochao/openapi-ui
# echo "---------docker pull success--------"
# docker stop ${{ secrets.IMAGE_NAME }}
# echo "---------docker stop container success--------"
# docker rm ${{ secrets.IMAGE_NAME }}
# echo "---------docker rm container success--------"
# docker run -dp ${{ secrets.HOST_PORT }}:80 -e ${{ secrets.ENVS }} --name ${{ secrets.IMAGE_NAME }} ghcr.io/rookie-luochao/openapi-ui
# echo "---------docker deploy success--------"