adding workflows autodeployment

This commit is contained in:
Peter Nashaat 2023-05-29 07:49:13 +00:00
parent 4b3acb3943
commit 7b4e9f7ca6
2 changed files with 32 additions and 8 deletions

24
.github/workflows/tf_update_dev.yml vendored Normal file
View File

@ -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

View File

@ -1,24 +1,24 @@
name: Ourworld.tf
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