This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
Rename getPrivateKey.yml to getPrivateKey.txt #272
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: Enviar para a vps | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Enviar os ficheiros via ssh para a vps | |
uses: appleboy/scp-action@master | |
env: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: david | |
PORT: 22 | |
KEY: ${{ secrets.KEY }} | |
with: | |
source: "." | |
target: "/home/david/danittobot" | |
updateDani: | |
name: Build and re-run danitto | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Iniciando o danitto | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: david | |
key: ${{ secrets.KEY }} | |
port: 22 | |
script: | | |
echo "Entrando no dirétorio" | |
cd danittobot | |
echo "Desligando o processo anterior" | |
docker stop danitto | |
docker rm danitto | |
sleep 3 | |
echo "Buildando o bot" | |
docker build -t danitto . | |
sleep 2 | |
echo "Ligando o Danitto" | |
docker run -d --name=danitto --memory=300m --memory-reservation=100m danitto |