-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ed1938
commit a6f0133
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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/ | ||
cd waw-default | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git clone [email protected]:WebArtWork/wjst-default.git wjst-default | ||
rm -rf wjst-default/* | ||
cp -r client/* wjst-default/ | ||
cp -r template/* wjst-default/ | ||
cd wjst-default | ||
echo "wjst-default.webart.work" > CNAME | ||
git add . | ||
|
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