diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 99bd0d5af..64567ffde 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,9 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 18 - - run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://git@github.com/ + - name: Prepare Draw Repository + run: | + git clone https://${{ secrets.PAT }}@github.com/roadmapsh/web-draw.git .temp/web-draw --depth 1 - uses: pnpm/action-setup@v2.2.2 with: version: 7.13.4 diff --git a/scripts/generate-renderer.sh b/scripts/generate-renderer.sh index d091def8b..e3cc69522 100644 --- a/scripts/generate-renderer.sh +++ b/scripts/generate-renderer.sh @@ -2,8 +2,11 @@ set -e -rm -rf .temp -git clone https://"$PAT"@github.com/roadmapsh/web-draw.git .temp/web-draw +# ignore cloning if .temp/web-draw already exists +if [ ! -d ".temp/web-draw" ]; then + mkdir -p .temp + git clone git@github.com:roadmapsh/web-draw.git .temp/web-draw +fi rm -rf renderer mkdir renderer @@ -24,8 +27,5 @@ find renderer -type f \( -name "*.ts" -o -name "*.tsx" \) -print0 | while IFS= r fi done -# remove the temporary directory -rm -rf .temp - # ignore the worktree changes for the renderer directory git update-index --skip-worktree renderer/*