From 123c877732d7b6a0feb2dbef241f3966a5d70347 Mon Sep 17 00:00:00 2001 From: Honchar Denys Date: Sun, 1 Dec 2024 00:02:09 +0200 Subject: [PATCH] update wjst template on vue-platform and react-platform --- .github/workflows/waw-default.yml | 16 ++++++++++++ .github/workflows/wjst-css.yml | 40 ++++++++++++++++++++++++++++++ .github/workflows/wjst-default.yml | 16 ++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 .github/workflows/wjst-css.yml diff --git a/.github/workflows/waw-default.yml b/.github/workflows/waw-default.yml index 18a65e6..f8f9b13 100644 --- a/.github/workflows/waw-default.yml +++ b/.github/workflows/waw-default.yml @@ -33,6 +33,22 @@ jobs: git add . git commit -m "Update files from source repository" || echo "No changes to commit" git push --force + cd .. + git clone git@github.com: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 git@github.com: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: | diff --git a/.github/workflows/wjst-css.yml b/.github/workflows/wjst-css.yml new file mode 100644 index 0000000..30305fb --- /dev/null +++ b/.github/workflows/wjst-css.yml @@ -0,0 +1,40 @@ +name: Sync SCSS to wjst-css + +on: + push: + paths: + - 'template/css/scss/**' # Trigger only on changes in the scss folder + +jobs: + sync-scss: + 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 SCSS folder to wjst-css + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git clone git@github.com:WebArtWork/wjst-css.git wjst-css + rm -rf wjst-css/* + cp -r template/css/scss/* wjst-css/ + cd wjst-css + git add . + git commit -m "Update SCSS 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 diff --git a/.github/workflows/wjst-default.yml b/.github/workflows/wjst-default.yml index cf3aa41..13d583f 100644 --- a/.github/workflows/wjst-default.yml +++ b/.github/workflows/wjst-default.yml @@ -34,6 +34,22 @@ jobs: git add . git commit -m "Update files from source repository" || echo "No changes to commit" git push --force + cd .. + git clone git@github.com:WebArtWork/vue-platform.git vue-platform + rm -rf vue-platform/template/* + cp -r template/* vue-platform/template/ + cd vue-platform + git add . + git commit -m "Update files from source repository" || echo "No changes to commit" + git push --force + cd .. + git clone git@github.com:WebArtWork/react-platform.git react-platform + rm -rf react-platform/template/* + cp -r template/* react-platform/template/ + 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: |