wndjs803 is testing out GitHub Actions 🚀 #7
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: GitHub Actions Demo | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using ssh key | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd 2023WB-Team-N | |
git checkout main | |
git pull origin main | |
docker-compose -f docker-compose.prod.yml down | |
docker container prune | |
docker rm -f $(docker ps -qa) | |
docker image prune | |
docker rmi $(docker images -q) | |
docker-compose -f docker-compose.prod.yml up --build |