-
Notifications
You must be signed in to change notification settings - Fork 0
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
1e0ebf5
commit 4876362
Showing
9 changed files
with
91 additions
and
9 deletions.
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,38 @@ | ||
name: DemoSync | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
TARGET_REPOSITORY: 'https://x-access-token:${{ secrets.DEMO_REPOSITORY_PAT }}@github.com/diploi/nextjs-sveltekit-template-demo.git' | ||
TAG_NAME: '${GITHUB_REF#refs/tags/}' | ||
|
||
jobs: | ||
sync-folder: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Sync initialProject folder and push tag | ||
run: | | ||
# Configure git | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Demo Sync" | ||
# Clone the target repository using HTTPS and PAT for authentication | ||
git clone ${{ env.TARGET_REPOSITORY }} temp_repo | ||
cd temp_repo | ||
# Sync the folder | ||
rsync -av --delete --exclude='.git/' ../initialProject/ ./ | ||
# Commit and push the changes, if there are any | ||
git add . | ||
git diff --quiet && git diff --staged --quiet || (git commit -m "Commit sync" && git push origin main) | ||
# Tag and push the tag | ||
git tag ${{ env.TAG_NAME }} | ||
git push origin --tags |
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
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
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
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
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,4 @@ | ||
{ | ||
"workbench.colorTheme": "Default Dark Modern", | ||
"workbench.startupEditor": "none" | ||
} |
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
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
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