Skip to content

Update main.yml

Update main.yml #8

Workflow file for this run

name: Auto-Deploy Flask App
on:
push:
branches:
- main
jobs:
deploy:
runs-on: [self-hosted]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: /home/githubrunner/actions-runner/_work/Maze-Solver/Maze-Solver
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Update system code
run: |
sudo systemctl stop flaskapp.service
sudo rsync -av --delete /home/githubrunner/actions-runner/_work/Maze-Solver/Maze-Solver/ /home/githubrunner/actions-runner/_work/Maze-Solver/Maze-Solver/
sudo chown -R githubrunner:githubrunner /home/githubrunner/actions-runner/_work/Maze-Solver/Maze-Solver/
sudo systemctl start flaskapp.service
- name: Verify service is running
run: |
sudo systemctl status flaskapp.service