From e161acce02f7db820bfc5a28577a4d0ab699d3c3 Mon Sep 17 00:00:00 2001 From: aanthonymax Date: Sun, 17 Nov 2024 18:48:56 +0300 Subject: [PATCH] add deploy blog --- .github/workflows/deploy-docs.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 831ef8b..d440602 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -45,8 +45,17 @@ jobs: with: branch: gh-pages folder: docs/.vuepress/dist - - name: Deploy to another repo + - name: Push to destination repository run: | - git checkout gh-pages - git remote add target https://github.com/hmpl-language/app.git - git push --force target $(git rev-parse --abbrev-ref HEAD):main + git config --global user.email "aanthonymax" + git config --global user.name "anthonymaxgit@gmail.com" + git clone https://${{ env.ORG_NAME }}:${{ secrets.SECRET_TOKEN }}@github.com/${{ env.ORG_NAME }}/app.git + cd app + git remote add ${{ env.ORIGINAL_REPO_NAME }} https://${{ env.ORG_NAME }}:${{ secrets.SECRET_TOKEN }}@github.com/${{ env.ORG_NAME }}/${{ env.ORIGINAL_REPO_NAME }}.git + git remote update + git merge ${{ env.ORIGINAL_REPO_NAME }}/gh-pages + git push origin gh-pages + env: + GITHUB_TOKEN: ${{ secrets.SECRET_TOKEN }} + ORIGINAL_REPO_NAME: ${{ github.event.repository.name }} + ORG_NAME: hmpl-language