Skip to content

Update issue templates #22

Update issue templates

Update issue templates #22

Workflow file for this run

name: Deploy to GCP Compute Engine
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install SSH key
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.GCP_SSH_PRIVATE_KEY }}
# - name: Run shell in Sudo
# run: |
# ssh -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} "sudo su"
- name: Stop running Python program
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} "sudo pkill -f python3"
- name: Temporarily commit changes
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} "cd /home/ayusht1d_gmail_com/CKC-Discord-Bot/ && sudo git rm -r --cached . && sudo git add . && sudo git commit -m 'removed ignored files' "
continue-on-error: true
- name: Pull latest code
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} "cd /home/ayusht1d_gmail_com/CKC-Discord-Bot/ && sudo git pull"
- name: Reboot system
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} "sudo reboot" || echo "Reboot initiated"
continue-on-error: true