Merge branch 'develop' #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Personal Repository | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
deploy-to-personal-repo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Main Repository | |
uses: actions/checkout@v4 | |
- name: Checkout Personal Repository | |
uses: actions/checkout@v4 | |
with: | |
repository: 1eeyerin/BloodFolio | |
token: ${{ secrets.PERSONAL_REPO }} | |
path: personal-repo | |
- name: Copy Files to Personal Repository | |
run: | | |
# Copy all files except the excluded directories | |
rsync -av --exclude={.git,.github,dist,node_modules} ./ ./personal-repo/ | |
cd personal-repo | |
git config --local user.email "${{ secrets.OFFICIAL_EMAIL }}" | |
git config --local user.name "yerin" | |
# Get the last commit message from the main repository | |
COMMIT_MESSAGE=$(git log -1 --pretty=%B ../) | |
# Commit and push the changes with the same commit message | |
git add . | |
git commit -m "$COMMIT_MESSAGE" | |
git push |