Skip to content

Commit 671ae81

Browse files
committed
fix
1 parent 970ad04 commit 671ae81

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

.github/workflows/exportAndPushToDApp.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,15 @@ jobs:
3333
yarn build
3434
yarn next export
3535
36-
- name: Clone target repository
37-
run: |
38-
git config --global user.email "juyichen0413@foxmail.com"
39-
git config --global user.name "JYC0413"
40-
git clone https://JYC0413:$GITHUB_TOKEN@github.com/GaiaNet-AI/gaianet-dapp.git
41-
42-
- name: Copy build files
43-
run: |
44-
cd gaianet-dapp
45-
cp -r ../out/* ./src/chatbot-ui
46-
47-
- name: Commit changes
36+
- name: Push directory to another repository
37+
if: ${{ github.event_name == 'push' }}
38+
uses: cpina/github-action-push-to-another-repository@main
4839
env:
49-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
50-
run: |
51-
cd gaianet-node
52-
git remote set-url --push origin https://JYC0413:$GITHUB_TOKEN@github.com/GaiaNet-AI/gaianet-dapp.git
53-
git config --global user.email "juyichen0413@foxmail.com"
54-
git config --global user.name "JYC0413"
55-
git add .
56-
git commit -m "Build and deploy chatbot-ui"
57-
git push
40+
API_TOKEN_GITHUB: ${{ secrets.WEB_DEPLOY }}
41+
with:
42+
source-directory: 'out'
43+
destination-github-username: 'GaiaNet-AI'
44+
destination-repository-name: 'gaianet-dapp'
45+
target-directory: 'src/chatbot-ui'
46+
user-email: juyichen0413@foxmail.com
47+
target-branch: main

0 commit comments

Comments
 (0)