Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.REMOTE_HOST }} | |
username: ${{ secrets.REMOTE_USER }} | |
port: ${{ secrets.REMOTE_PORT }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd /home/pychan/PyChan-Bot | |
git checkout master | |
git pull | |
docker build -t pychan . | |
cd ../ | |
docker compose up -d | |
echo "$(date): actions build success" >> actions-logs.txt |