-
Notifications
You must be signed in to change notification settings - Fork 34
35 lines (31 loc) · 1.15 KB
/
Copy pathdev_deploy.yml
File metadata and controls
35 lines (31 loc) · 1.15 KB
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
name: DevDeploy
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
DevDeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up ssh-agent
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
script_stop: true
script: |
cd manga-bot/tg-manga-bot-dev
git pull origin master
docker container rm -f manga-bot-dev 2> /dev/null || true
docker build . -t manga-bot-dev
docker run --name manga-bot-dev --restart=always -dti \
--env BOT_TOKEN=${{ secrets.DEV_BOT_TOKEN }} \
--env API_ID=${{ secrets.API_ID }} \
--env API_HASH=${{ secrets.API_HASH }} \
--env DATABASE_URL_PRIMARY=${{ secrets.DEV_DATABASE_URI }} \
--env LOG_LEVEL=${{ secrets.DEV_LOG_LEVEL }} \
manga-bot-dev