diff --git a/.github/workflows/tf_update_dev.yml b/.github/workflows/tf_update_dev.yml new file mode 100644 index 0000000..cc8497f --- /dev/null +++ b/.github/workflows/tf_update_dev.yml @@ -0,0 +1,24 @@ +name: www2.ourworld.tf +on: + push: + branches: [ development ] + +jobs: + job_one: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: pushing latest change on www2.ourworld.tf + uses: appleboy/ssh-action@master + with: + host: www2.ourworld.tf + username: webuser + key: ${{ secrets.TF_SECRET }} + port: 34022 + script: | + cd websites/www2/www_ourworld_tf/ + git log -1 + git restore . + git pull + sed -i "s/https:\/\/ourworld.tf/https:\/\/www2.ourworld.tf/g" config.toml + ./build.sh diff --git a/.github/workflows/tf_update.yml b/.github/workflows/tf_update_prod.yml similarity index 55% rename from .github/workflows/tf_update.yml rename to .github/workflows/tf_update_prod.yml index f976fdc..19ebfce 100644 --- a/.github/workflows/tf_update.yml +++ b/.github/workflows/tf_update_prod.yml @@ -1,24 +1,24 @@ -name: Ourworld.tf -on: +name: ourworld.tf +on: push: - branch: [ development ] + branches: [ master ] jobs: job_one: name: Deploy runs-on: ubuntu-latest steps: - - name: pushing latest change on www.ourworld.tf + - name: pushing latest change on ourworld.tf uses: appleboy/ssh-action@master with: - host: www.ourworld.tf + host: ourworld.tf username: webuser key: ${{ secrets.TF_SECRET }} port: 34022 script: | cd websites/www_ourworld_tf/ git log -1 + git restore . git pull - bash build.sh - - + sed -i "s/https:\/\/www2.ourworld.tf/https:\/\/ourworld.tf/g" config.toml + ./build.sh diff --git a/build.sh b/build.sh old mode 100644 new mode 100755