Auto-update blockchainbonds
This commit is contained in:
parent
8a9606f972
commit
ca5f1ac13a
2
blockchainbonds/.gitattributes
vendored
Normal file
2
blockchainbonds/.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
49
blockchainbonds/.github/workflows/push-dappbundle.yml
vendored
Normal file
49
blockchainbonds/.github/workflows/push-dappbundle.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: Deploy to Dappbundle
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Deploy via SSH
|
||||||
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.R_HOST }}
|
||||||
|
username: ${{ secrets.P_USERNAME }}
|
||||||
|
password: ${{ secrets.P_PASSWORD }}
|
||||||
|
port: ${{ secrets.SSH_PORT }}
|
||||||
|
script: |
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BASE="${{ secrets.DEPLOYMENT_LOCATION }}"
|
||||||
|
APP="${{ github.event.repository.name }}"
|
||||||
|
|
||||||
|
echo "== Ensuring dappbundle repo exists =="
|
||||||
|
|
||||||
|
if [ ! -d "$BASE/dappbundle/.git" ]; then
|
||||||
|
echo "Cloning dappbundle..."
|
||||||
|
git clone git@gitea.ranchimall.net:RanchiMall/dappbundle.git "$BASE/dappbundle"
|
||||||
|
else
|
||||||
|
echo "Updating dappbundle..."
|
||||||
|
cd "$BASE/dappbundle"
|
||||||
|
git pull
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "== Refreshing app bundle =="
|
||||||
|
|
||||||
|
rm -rf "$BASE/dappbundle/$APP"
|
||||||
|
git clone git@gitea.ranchimall.net:RanchiMall/$APP.git "$BASE/dappbundle/$APP"
|
||||||
|
|
||||||
|
cd "$BASE/dappbundle"
|
||||||
|
git config user.email "ranchimallfze@gmail.com"
|
||||||
|
git config user.name "ranchimall"
|
||||||
|
|
||||||
|
git add .
|
||||||
|
git commit -m "Auto-update $APP" || echo "No changes to commit"
|
||||||
|
git push
|
||||||
1
blockchainbonds/.gitignore
vendored
Normal file
1
blockchainbonds/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.tmp*
|
||||||
Loading…
Reference in New Issue
Block a user