Skip to content

Commit

Permalink
Testing automated ga deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Deutscher775 authored Aug 21, 2024
1 parent 797c326 commit 8be4073
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/automated_api_deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy Astroid API update via Github Actions
on:
push:
branches:
- main

jobs:
pull_changes:
runs-on: ubuntu-latest
steps:
- name: API Shutdown
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
sudo systemctl stop astroidapi
- name: Pull changes
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /root/astroid
git pull origin main
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy the API
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
sudo systemctl start astroidapi

0 comments on commit 8be4073

Please sign in to comment.