removed birds #12
This file contains hidden or 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: Sync waw default project to waw-default | |
on: | |
push: | |
paths: | |
- "server/**" # Trigger only on changes in the server folder | |
jobs: | |
sync-waw: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source repository | |
uses: actions/checkout@v3 | |
- name: Set up SSH | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
- name: Sync waw default folder to waw-default | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git clone [email protected]:WebArtWork/waw-default.git waw-default | |
rm -rf waw-default/* | |
cp -r server/* waw-default/server/ | |
node .github/clean.config.js | |
cp -r config.json waw-default/config.json | |
cd waw-default | |
git add . | |
git commit -m "Update files from source repository" || echo "No changes to commit" | |
git push --force | |
cd .. | |
git clone [email protected]:WebArtWork/vue-platform.git vue-platform | |
rm -rf vue-platform/server/* | |
cp -r server/* vue-platform/server/ | |
cd vue-platform | |
git add . | |
git commit -m "Update files from source repository" || echo "No changes to commit" | |
git push --force | |
cd .. | |
git clone [email protected]:WebArtWork/react-platform.git react-platform | |
rm -rf react-platform/server/* | |
cp -r server/* react-platform/server/ | |
cd react-platform | |
git add . | |
git commit -m "Update files from source repository" || echo "No changes to commit" | |
git push --force | |
- name: Clean up SSH | |
run: | | |
rm -f ~/.ssh/id_rsa | |
rm -f ~/.ssh/known_hosts |