Skip to content

Commit

Permalink
ci(sendsay-docs): build project in another repo
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksnick committed Dec 20, 2023
1 parent 37d80bf commit f2ad39a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/usr/bin/env bash

export BUILD_PATH=build-docs
export BRANCH=stable
export RELEASE_NAME=$(git log -1 --pretty=format:"%s %h %an")
export MESSAGE=$RELEASE_NAME
export BUILD_REPO=sendsay-docs-build

git clone [email protected]:sendsay-ru/sendsay-frontend-builds.git /tmp/sendsay-frontend-builds
git clone [email protected]:sendsay-ru/$BUILD_REPO.git /tmp/$BUILD_REPO

yarn run build

rm -rf /tmp/sendsay-frontend-builds/$BUILD_PATH
rm -rf /tmp/$BUILD_REPO/$BUILD_PATH

yes | cp -R build /tmp/sendsay-frontend-builds/$BUILD_PATH
yes | cp -R build /tmp/$BUILD_REPO/$BUILD_PATH

cd /tmp/sendsay-frontend-builds
cd /tmp/$BUILD_REPO

echo $MESSAGE > $BUILD_PATH/COMMIT

git add .
git commit -m "$MESSAGE"
git push origin master
git push origin $BRANCH

0 comments on commit f2ad39a

Please sign in to comment.