From 5c120784c63f32a38848ce788ad2e63d271edf7c Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:28:39 +0530 Subject: [PATCH 01/15] Update app.py --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index d82c51f0d..fc124f63d 100644 --- a/app.py +++ b/app.py @@ -4,3 +4,5 @@ @app.route('/') def hello_world(): return 'Hello, World!' +if __name__ == "__main__": + app.run() From 6b251b2d950fe2f3e4fddacb122f1a2ea806b5b7 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 08:37:26 +0530 Subject: [PATCH 02/15] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index fc124f63d..735c5d4de 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,6 @@ @app.route('/') def hello_world(): - return 'Hello, World!' + return 'Hello, World! This is Aarish' if __name__ == "__main__": app.run() From 7a8f623b1b4f462077d343f7da14003e78d6d827 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 08:56:26 +0530 Subject: [PATCH 03/15] Create deploy.yaml --- deploy.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 000000000..c31772eb6 --- /dev/null +++ b/deploy.yaml @@ -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/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.VM_KEY }} + + - name: Deploy to VM + run: | + ssh -o StrictHostKeyChecking=no ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }} << 'EOF' + cd /home/Aarish/flask-hello-world + git pull origin master + sudo systemctl restart flaskapp + EOF From 5118649a16d8661fc9eac6c2dec4ff07cf72317a Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:12:01 +0530 Subject: [PATCH 04/15] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 735c5d4de..223450478 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,6 @@ @app.route('/') def hello_world(): - return 'Hello, World! This is Aarish' + return 'Hello, World! This is Aarish ' if __name__ == "__main__": app.run() From 82810b8f1f6c09b95d0d96a0c5e3cb8183d67349 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:19:22 +0530 Subject: [PATCH 05/15] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 223450478..075ebc81b 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,6 @@ @app.route('/') def hello_world(): - return 'Hello, World! This is Aarish ' + return 'Hello, World! This is Aarish Thanks' if __name__ == "__main__": app.run() From fb3e2b897611310572fd23242da242003636bdbc Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:24:58 +0530 Subject: [PATCH 06/15] Create main.yml --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..c687f57c7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: Deploy to VM + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.VM_KEY }} + + - name: Deploy to VM + run: | + ssh -o StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' + cd /home/Aarish/flask-hello-world + git pull origin main + sudo systemctl restart flaskapp + EOF From acfd06fdcabcdae1920096975e0be5240c52d6ca Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 15 Jul 2024 04:00:18 +0000 Subject: [PATCH 07/15] deleted the deploye --- deploy.yaml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml deleted file mode 100644 index c31772eb6..000000000 --- a/deploy.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.VM_KEY }} - - - name: Deploy to VM - run: | - ssh -o StrictHostKeyChecking=no ${{ secrets.VM_USER }}@${{ secrets.VM_HOST }} << 'EOF' - cd /home/Aarish/flask-hello-world - git pull origin master - sudo systemctl restart flaskapp - EOF From b4578529306142fe5b27495fb54b7e43eccf5714 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:43:16 +0530 Subject: [PATCH 08/15] Create deploy.yaml --- .github/workflows/deploy.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 000000000..c687f57c7 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,27 @@ +name: Deploy to VM + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.VM_KEY }} + + - name: Deploy to VM + run: | + ssh -o StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' + cd /home/Aarish/flask-hello-world + git pull origin main + sudo systemctl restart flaskapp + EOF From 95a734947ceffd085f374783ac71aae4f64038c5 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:45:45 +0530 Subject: [PATCH 09/15] Update deploy.yaml --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c687f57c7..c8a1ee74d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,7 +3,7 @@ name: Deploy to VM on: push: branches: - - main + - master jobs: deploy: @@ -22,6 +22,6 @@ jobs: run: | ssh -o StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' cd /home/Aarish/flask-hello-world - git pull origin main + git pull origin master sudo systemctl restart flaskapp EOF From 59d16dce2786b00cc3b2b547d9abaf8181ab29e7 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:54:07 +0530 Subject: [PATCH 10/15] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 075ebc81b..afa301d25 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,6 @@ @app.route('/') def hello_world(): - return 'Hello, World! This is Aarish Thanks' + return 'Hello, World! This is Aarish Thanks ' if __name__ == "__main__": app.run() From ece176549deab3d4abe6da361efc63d5c90559a8 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:57:30 +0530 Subject: [PATCH 11/15] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c687f57c7..81dc1861a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: Deploy to VM on: push: branches: - - main + - master jobs: deploy: @@ -20,8 +20,8 @@ jobs: - name: Deploy to VM run: | - ssh -o StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' + ssh StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' cd /home/Aarish/flask-hello-world - git pull origin main + git pull origin master sudo systemctl restart flaskapp EOF From ae9cd83e7edbd1251ad29f8a43b15c571f19cc13 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:01:02 +0530 Subject: [PATCH 12/15] Update deploy.yaml --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c8a1ee74d..e934d8c1e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v3 - name: Set up SSH - uses: webfactory/ssh-agent@v0.5.3 + uses: webfactory/ssh-agent@v0.5.4 with: ssh-private-key: ${{ secrets.VM_KEY }} From a9920cafc8bd2f66d1d504edf55b74d6f12ed45b Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:06:29 +0530 Subject: [PATCH 13/15] Update deploy.yaml --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e934d8c1e..7c3032011 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - name: Checkout code From f1fd884f50cb4817d499ae0d88af7bfd911762ff Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:07:50 +0530 Subject: [PATCH 14/15] Update deploy.yaml --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7c3032011..9d728db48 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: - name: Deploy to VM run: | - ssh -o StrictHostKeyChecking=no Aarish@172.172.151.63 << 'EOF' + ssh Aarish@172.172.151.63 << 'EOF' cd /home/Aarish/flask-hello-world git pull origin master sudo systemctl restart flaskapp From 2f708351a5d0b8971454bab971a44855eac6aa32 Mon Sep 17 00:00:00 2001 From: Aarish Mohmmad <99970799+Aarishmd@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:15:25 +0530 Subject: [PATCH 15/15] Update deploy.yaml