Skip to content

Commit 1fee8d0

Browse files
author
Udhaya kumar
authored
Merge branch 'kamranahmedse:master' into master
2 parents 1959b17 + 38d2b29 commit 1fee8d0

5,184 files changed

Lines changed: 46350 additions & 139870 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.astro/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"enabled": false
44
},
55
"_variables": {
6-
"lastUpdateCheck": 1753810743067
6+
"lastUpdateCheck": 1763378528944
77
}
88
}

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ PUBLIC_STRIPE_INDIVIDUAL_MONTHLY_PRICE_ID=
77
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_ID=
88

99
PUBLIC_STRIPE_INDIVIDUAL_MONTHLY_PRICE_AMOUNT=10
10-
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_AMOUNT=100
10+
PUBLIC_STRIPE_INDIVIDUAL_YEARLY_PRICE_AMOUNT=100
11+
12+
ROADMAP_API_KEY=

.github/ISSUE_TEMPLATE/05-project-contribution.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/refresh-roadmap-content-json.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Sync Content to Repo
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
roadmap_slug:
7+
description: "The ID of the roadmap to sync"
8+
required: true
9+
default: "__default__"
10+
11+
jobs:
12+
sync-content:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup pnpm@v9
18+
uses: pnpm/action-setup@v4
19+
with:
20+
version: 9
21+
run_install: false
22+
23+
- name: Setup Node.js Version 20 (LTS)
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install Dependencies and Sync Content
30+
run: |
31+
echo "Installing Dependencies"
32+
pnpm install
33+
echo "Syncing Content to Repo"
34+
npm run sync:content-to-repo -- --roadmap-slug=${{ inputs.roadmap_slug }} --secret=${{ secrets.GH_SYNC_SECRET }}
35+
36+
- name: Check for changes
37+
id: verify-changed-files
38+
run: |
39+
if [ -n "$(git status --porcelain)" ]; then
40+
echo "changed=true" >> $GITHUB_OUTPUT
41+
else
42+
echo "changed=false" >> $GITHUB_OUTPUT
43+
fi
44+
45+
- name: Create PR
46+
if: steps.verify-changed-files.outputs.changed == 'true'
47+
uses: peter-evans/create-pull-request@v7
48+
with:
49+
delete-branch: false
50+
branch: "chore/sync-content-to-repo-${{ inputs.roadmap_slug }}"
51+
base: "master"
52+
labels: |
53+
automated pr
54+
reviewers: jcanalesluna,kamranahmedse
55+
commit-message: "chore: sync content to repo"
56+
title: "chore: sync content to repository - ${{ inputs.roadmap_slug }}"
57+
body: |
58+
## Sync Content to Repo
59+
60+
> [!IMPORTANT]
61+
> This PR Syncs the Content to the Repo for the Roadmap: ${{ inputs.roadmap_slug }}
62+
>
63+
> Commit: ${{ github.sha }}
64+
> Workflow Path: ${{ github.workflow_ref }}
65+
66+
**Please Review the Changes and Merge the PR if everything is fine.**
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Sync Repo to Database
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
roadmap_slug:
7+
description: "The slug of the roadmap to sync (e.g., frontend, backend)"
8+
required: true
9+
10+
jobs:
11+
sync-roadmap:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup pnpm@v9
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 9
20+
run_install: false
21+
22+
- name: Setup Node.js Version 20 (LTS)
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'pnpm'
27+
28+
- name: Get all roadmap files
29+
id: roadmap-files
30+
run: |
31+
ROADMAP_DIR="src/data/roadmaps/${{ inputs.roadmap_slug }}"
32+
33+
if [ ! -d "$ROADMAP_DIR" ]; then
34+
echo "Error: Roadmap directory '$ROADMAP_DIR' does not exist"
35+
exit 1
36+
fi
37+
38+
echo "Getting all files in $ROADMAP_DIR"
39+
40+
ALL_FILES=$(find "$ROADMAP_DIR" -type f | tr '\n' ',')
41+
42+
echo "Files to sync:"
43+
echo "$ALL_FILES"
44+
45+
echo "files=$ALL_FILES" >> $GITHUB_OUTPUT
46+
47+
- name: Install Dependencies
48+
run: |
49+
echo "Installing Dependencies"
50+
pnpm install
51+
52+
- name: Run sync script
53+
run: |
54+
echo "Running sync script for roadmap: ${{ inputs.roadmap_slug }}"
55+
echo "Files: ${{ steps.roadmap-files.outputs.files }}"
56+
57+
npm run sync:repo-to-database -- --files="${{ steps.roadmap-files.outputs.files }}" --secret=${{ secrets.GH_SYNC_SECRET }}

astro.config.mjs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,29 @@ export default defineConfig({
2020
status: 301,
2121
destination: '/ai',
2222
},
23-
},
24-
vite: {
25-
server: {
26-
allowedHosts: ['roadmap.sh', 'port3k.kamranahmed.info'],
23+
'/best-practices': {
24+
status: 301,
25+
destination: '/roadmaps',
26+
},
27+
'/best-practices/aws': {
28+
status: 301,
29+
destination: '/aws-best-practices',
30+
},
31+
'/best-practices/backend-performance': {
32+
status: 301,
33+
destination: '/backend-performance-best-practices',
34+
},
35+
'/best-practices/frontend-performance': {
36+
status: 301,
37+
destination: '/frontend-performance-best-practices',
38+
},
39+
'/best-practices/api-security': {
40+
status: 301,
41+
destination: '/api-security-best-practices',
42+
},
43+
'/best-practices/code-review': {
44+
status: 301,
45+
destination: '/code-review-best-practices',
2746
},
2847
},
2948
markdown: {
@@ -72,5 +91,8 @@ export default defineConfig({
7291
ssr: {
7392
noExternal: [/^@roadmapsh\/editor.*$/],
7493
},
94+
server: {
95+
allowedHosts: ['roadmap.sh', 'port3k.kamranahmed.info'],
96+
},
7597
},
7698
});

contributing.md

Lines changed: 3 additions & 0 deletions

license

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@ conditions do not apply to the readonly GitHub forks created using the Fork butt
1010
GitHub with the whole purpose of contributing to the project.
1111

1212
Copyright © 2017 - Present. Kamran Ahmed <kamranahmed.se@gmail.com>
13-
14-
Please note that I am really flexible with allowing the usage of the content in this
15-
repository. If you reach out to me with a brief detail of why and how you would like
16-
to use this content, there is a good chance that I will allow you to use it. The reason
17-
behind this strictness in the license is to stop the people who have been using these
18-
roadmaps in ill manners e.g. ripping people off with suggesting random affiliate links,
19-
redistributing these roadmaps just for the sake of monetizing the traffic.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"compress:images": "tsx ./scripts/compress-images.ts",
3030
"generate:roadmap-content-json": "tsx ./scripts/editor-roadmap-content-json.ts",
3131
"migrate:editor-roadmaps": "tsx ./scripts/migrate-editor-roadmap.ts",
32+
"sync:content-to-repo": "tsx ./scripts/sync-content-to-repo.ts",
33+
"sync:repo-to-database": "tsx ./scripts/sync-repo-to-database.ts",
34+
"sync:roadmap": "tsx ./scripts/sync-roadmap-to-database.ts",
35+
"migrate:content-repo-to-database": "tsx ./scripts/migrate-content-repo-to-database.ts",
36+
"official:roadmap-assets": "tsx ./scripts/official-roadmap-assets.ts",
3237
"test:e2e": "playwright test"
3338
},
3439
"dependencies": {

0 commit comments

Comments
 (0)