From 790ac5b144e427d17fe5234e5df945f514098b3e Mon Sep 17 00:00:00 2001 From: ranchimall Date: Thu, 5 Mar 2026 20:32:28 +0000 Subject: [PATCH] Auto-update exchangemarket --- exchangemarket/.gitattributes | 2 + .../.github/workflows/push-dappbundle.yml | 49 +++++++++++++++++++ exchangemarket/.gitignore | 11 +++++ 3 files changed, 62 insertions(+) create mode 100644 exchangemarket/.gitattributes create mode 100644 exchangemarket/.github/workflows/push-dappbundle.yml create mode 100644 exchangemarket/.gitignore diff --git a/exchangemarket/.gitattributes b/exchangemarket/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/exchangemarket/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/exchangemarket/.github/workflows/push-dappbundle.yml b/exchangemarket/.github/workflows/push-dappbundle.yml new file mode 100644 index 0000000..543f252 --- /dev/null +++ b/exchangemarket/.github/workflows/push-dappbundle.yml @@ -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 \ No newline at end of file diff --git a/exchangemarket/.gitignore b/exchangemarket/.gitignore new file mode 100644 index 0000000..561dd00 --- /dev/null +++ b/exchangemarket/.gitignore @@ -0,0 +1,11 @@ +/node_modules/ +/package-lock.json +/args/config*.json +/args/param.json +/args/keys*.json +/args/prime_index*.b +/args/indexes*/ +/log.txt +/bash_start* +*test* +*.tmp*