Skip to content

Adding the name #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to VM

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.VM_KEY }}

- name: Deploy to VM
run: |
ssh [email protected] << 'EOF'
cd /home/Aarish/flask-hello-world
git pull origin master
sudo systemctl restart flaskapp
EOF
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to VM

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.VM_KEY }}

- name: Deploy to VM
run: |
ssh StrictHostKeyChecking=no [email protected] << 'EOF'
cd /home/Aarish/flask-hello-world
git pull origin master
sudo systemctl restart flaskapp
EOF
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@

@app.route('/')
def hello_world():
return 'Hello, World!'
return 'Hello, World! This is Aarish Thanks '
if __name__ == "__main__":
app.run()