mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-22 17:02:58 +02:00
Update deployment workflow
This commit is contained in:
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
@@ -7,7 +7,6 @@ env:
|
|||||||
PUBLIC_EDITOR_APP_URL: "https://draw.roadmap.sh"
|
PUBLIC_EDITOR_APP_URL: "https://draw.roadmap.sh"
|
||||||
PUBLIC_AVATAR_BASE_URL: "https://dodrc8eu8m09s.cloudfront.net/avatars"
|
PUBLIC_AVATAR_BASE_URL: "https://dodrc8eu8m09s.cloudfront.net/avatars"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PAT: ${{ secrets.PAT }}
|
|
||||||
CI: true
|
CI: true
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -19,15 +18,13 @@ jobs:
|
|||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- name: Prepare Draw Repository
|
|
||||||
run: |
|
|
||||||
git clone https://${{ secrets.GH_PAT }}@github.com/roadmapsh/web-draw.git .temp/web-draw --depth 1
|
|
||||||
- uses: pnpm/action-setup@v2.2.2
|
- uses: pnpm/action-setup@v2.2.2
|
||||||
with:
|
with:
|
||||||
version: 7.13.4
|
version: 7.13.4
|
||||||
- name: Setup Environment
|
- name: Setup Environment
|
||||||
run: |
|
run: |
|
||||||
pnpm install
|
pnpm install
|
||||||
|
- run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/
|
||||||
- name: Generate meta and build
|
- name: Generate meta and build
|
||||||
run: |
|
run: |
|
||||||
npm run generate-renderer
|
npm run generate-renderer
|
||||||
|
@@ -2,11 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# ignore cloning if .temp/web-draw already exists
|
rm -rf .temp
|
||||||
if [ ! -d ".temp/web-draw" ]; then
|
|
||||||
mkdir -p .temp
|
|
||||||
git clone git@github.com:roadmapsh/web-draw.git .temp/web-draw
|
git clone git@github.com:roadmapsh/web-draw.git .temp/web-draw
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf renderer
|
rm -rf renderer
|
||||||
mkdir renderer
|
mkdir renderer
|
||||||
@@ -27,5 +24,8 @@ find renderer -type f \( -name "*.ts" -o -name "*.tsx" \) -print0 | while IFS= r
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# remove the temporary directory
|
||||||
|
rm -rf .temp
|
||||||
|
|
||||||
# ignore the worktree changes for the renderer directory
|
# ignore the worktree changes for the renderer directory
|
||||||
git update-index --skip-worktree renderer/*
|
git update-index --skip-worktree renderer/*
|
||||||
|
Reference in New Issue
Block a user