Skip to content

Commit

Permalink
add deploy blog
Browse files Browse the repository at this point in the history
  • Loading branch information
aanthonymax committed Nov 17, 2024
1 parent b955b85 commit e161acc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e161acc

Please sign in to comment.