Merge pull request #6 from ourworld-tsc/development

adding new gh actions
This commit is contained in:
PeterNashaat 2023-07-16 15:05:25 +03:00 committed by GitHub
commit e9d6080382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 41 deletions

View File

@ -1,17 +0,0 @@
# On every push this script is executed
on: push
name: Build and deploy GH Pages
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/development'
steps:
- name: checkout
uses: actions/checkout@v2
- name: build_and_deploy
uses: shalzz/zola-deploy-action@v0.14.1
env:
# Target branch
PAGES_BRANCH: gh-pages
# Provide personal access token
TOKEN: ${{ secrets.TOKEN }}

View File

@ -1,23 +0,0 @@
name: www2.ourverse.tf
on:
push:
branch: [development]
jobs:
job_one:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: pushing latest change on www2.ourverse.tf
uses: appleboy/ssh-action@master
with:
host: www2.ourverse.tf
username: webuser
key: ${{ secrets.TF_SECRET }}
port: 34022
script: |
cd websites/www_ourverse/
git log -1
git restore .
git pull
bash build.sh

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

@ -0,0 +1,24 @@
name: www2.ourverse.tf
on:
push:
branches: [ development ]
jobs:
job_one:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: pushing latest change on www2.ourverse.tf
uses: appleboy/ssh-action@master
with:
host: www2.ourverse.tf
username: webuser
key: ${{ secrets.TF_SECRET }}
port: 34022
script: |
cd websites/www2/www_ourverse/
git log -1
git clean -f
git pull
sed -i "s/https:\/\/ourverse.tf/https:\/\/www2.ourverse.tf/g" config.toml
./build.sh

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

@ -0,0 +1,24 @@
name: ourverse.tf
on:
push:
branches: [ master ]
jobs:
job_one:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: pushing latest change on ourverse.tf
uses: appleboy/ssh-action@master
with:
host: ourverse.tf
username: webuser
key: ${{ secrets.TF_SECRET }}
port: 34022
script: |
cd websites/www_ourverse/
git log -1
git clean -f
git pull
sed -i "s/https:\/\/www2.ourverse.tf/https:\/\/ourverse.tf/g" config.toml
./build.sh

1
.gitignore vendored
View File

@ -26,4 +26,3 @@ install*
public
static/css
tailwindcss
.github