[Add] キャッシュの削除機能を追加 #34
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: AutoDeploy | |
on: | |
push: | |
branches: [main] | |
jobs: | |
main: | |
name: Send Deploy Commands via SSH | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send Deploy Commands via SSH (step) | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
port: ${{ secrets.SSH_PORT }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
export VOLTA_HOME="$HOME/.volta" | |
export PATH="$VOLTA_HOME/bin:$PATH" | |
cd ~/repos/PaperMC | |
docker-compose down | |
cd ~/node/MixJuice | |
pm2 stop mixjuice | |
git fetch | |
git reset --hard origin/main | |
yarn install | |
yarn build | |
pm2 restart mixjuice | |
cd ~/repos/PaperMC | |
docker-compose up -d |