From 0c81d6b0dfba7f9cfc57ced443b73e46445d4a05 Mon Sep 17 00:00:00 2001 From: Peter Nashaat Date: Thu, 18 May 2023 09:46:39 +0000 Subject: [PATCH] creating prod autodep --- .github/workflows/tf_update.yml | 23 ----------------------- .github/workflows/tf_update_dev.yml | 24 ++++++++++++++++++++++++ .github/workflows/tf_update_prod.yml | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/tf_update.yml create mode 100644 .github/workflows/tf_update_dev.yml create mode 100644 .github/workflows/tf_update_prod.yml diff --git a/.github/workflows/tf_update.yml b/.github/workflows/tf_update.yml deleted file mode 100644 index 6516294..0000000 --- a/.github/workflows/tf_update.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: ournomads.ourworld.tf -on: - push: - branch: [development] - -jobs: - job_one: - name: Deploy - runs-on: ubuntu-latest - steps: - - name: pushing latest change on ournomads.ourworld.tf - uses: appleboy/ssh-action@master - with: - host: ournomads.ourworld.tf - username: webuser - key: ${{ secrets.TF_SECRET }} - port: 34022 - script: | - cd websites/www2/www_ournomads/ - git log -1 - git restore . - git pull - bash build.sh diff --git a/.github/workflows/tf_update_dev.yml b/.github/workflows/tf_update_dev.yml new file mode 100644 index 0000000..51c32ec --- /dev/null +++ b/.github/workflows/tf_update_dev.yml @@ -0,0 +1,24 @@ +name: www2.ournomads.ourworld.tf +on: + push: + branches: [ development ] + +jobs: + job_one: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: pushing latest change on www2.ournomads.ourworld.tf + uses: appleboy/ssh-action@master + with: + host: www2.ournomads.ourworld.tf + username: webuser + key: ${{ secrets.TF_SECRET }} + port: 34022 + script: | + cd websites/www2/www_ournomads/ + git log -1 + git restore . + git pull + sed -i "s/https:\/\/ournomads.ourworld.tf/https:\/\/www2.ournomads.ourworld.tf/g" config.toml + ./build.sh diff --git a/.github/workflows/tf_update_prod.yml b/.github/workflows/tf_update_prod.yml new file mode 100644 index 0000000..ba2564f --- /dev/null +++ b/.github/workflows/tf_update_prod.yml @@ -0,0 +1,24 @@ +name: ournomads.ourworld.tf +on: + push: + branches: [ master ] + +jobs: + job_one: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: pushing latest change on ournomads.ourworld.tf + uses: appleboy/ssh-action@master + with: + host: ournomads.ourworld.tf + username: webuser + key: ${{ secrets.TF_SECRET }} + port: 34022 + script: | + cd websites/www_ournomads/ + git log -1 + git restore . + git pull + sed -i "s/https:\/\/www2.ournomads.ourworld.tf/https:\/\/ournomads.ourworld.tf/g" config.toml + ./build.sh