Skip to content

Deploy Blog

Deploy Blog #15

Workflow file for this run

name: Deploy Blog
on:
workflow_run:
workflows: ["CI"]
types:
- completed
permissions:
contents: write
jobs:
deploy-blog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# if your docs needs submodules, uncomment the following line
# submodules: true
- name: Switch to another branch
run: |
git fetch origin blog
git checkout blog
- name: Push to destination repository
run: |
git config --global user.name "aanthonymax"
git config --global user.email "anthonymaxgit@gmail.com"
git clone https://github.com/${{ env.ORG_NAME }}/blog.git
cd blog
git remote add ${{ env.ORIGINAL_REPO_NAME }} https://github.com/${{ env.ORG_NAME }}/${{ env.ORIGINAL_REPO_NAME }}.git
git remote update
git merge ${{ env.ORIGINAL_REPO_NAME }}/blog --allow-unrelated-histories
git push origin blog
env:
ORIGINAL_REPO_NAME: ${{ github.event.repository.name }}
ORG_NAME: hmpl-language