File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ jobs:
2121
2222 steps :
2323 - name : Checkout
24- uses : actions/checkout@v5
24+ uses : actions/checkout@v6
2525 with :
2626 submodules : recursive
2727 fetch-depth : 0
2828
2929 - name : Update submodule
30- run : npm run sync:mods
30+ run : git submodule update --remote
3131
32- - name : Check update
32+ - name : Check status
3333 id : check
3434 run : |
3535 if [[ -n "$(git status --porcelain)" ]]; then
@@ -38,13 +38,13 @@ jobs:
3838 echo "update=false" >> $GITHUB_OUTPUT
3939 fi
4040
41- - name : Commit update
41+ - name : Commit changes
4242 if : steps.check.outputs.update == 'true'
4343 run : |
4444 git config user.name "github-actions[bot]"
4545 git config user.email "github-actions[bot]@users.noreply.github.com"
46- git add .
47- git commit -m "chore: sync with ejs"
46+ git add ejs
47+ git commit -m "chore(main) : sync with ejs"
4848 git push origin main
4949
5050 update :
@@ -53,24 +53,24 @@ jobs:
5353 runs-on : ubuntu-latest
5454 steps :
5555 - name : Checkout
56- uses : actions/checkout@v5
56+ uses : actions/checkout@v6
5757 with :
5858 submodules : recursive
5959 fetch-depth : 0
6060
6161 - name : Setup Node
6262 uses : actions/setup-node@v5
6363
64- - name : Sync deps
64+ - name : Sync dependencies
6565 run : npm run sync:deps
6666
67- - name : Commit deps
67+ - name : Commit changes
6868 run : |
6969 if [[ -n "$(git status --porcelain)" ]]; then
7070 git config user.name "github-actions[bot]"
7171 git config user.email "github-actions[bot]@users.noreply.github.com"
72- git add .
73- git commit -m "deps: sync with ejs"
72+ git add package.json
73+ git commit -m "chore( deps) : sync with ejs"
7474 git push origin main
7575 else
7676 exit 0
Original file line number Diff line number Diff line change 11[submodule "ejs "]
22 path = ejs
33 url = https://github.com/yt-dlp/ejs
4+ branch = main
Original file line number Diff line number Diff line change 1- package-lock = false
2- legacy-peer-deps = true
1+ package-lock = false
Original file line number Diff line number Diff line change 11## Setup
22
33- Clone this repository
4- - Run ` npm run sync:mods ` to bring submodules
4+ - Run ` git config submodule.recurse true `
5+ - Run ` git pull ` to clone the ejs subdmodule
56- Run ` npm install ` to install all dependencies
6- - Configure the service in ` .env ` and run ` npm start `
7+ - Configure the service in ` .env `
78
89## Maintain
910
10- - Run ` npm run sync:mods ` to sync with ejs
11- - Run ` npm run sync:deps ` to bring any new dependencies from ejs
11+ - A workflow keeps the branch up-to-date
12+ - You can run ` git submodule update --remote ` to update manually
13+ - Run ` npm run sync:deps ` after update to sync all dependencies
1214- Run ` npm run build ` to build and ensure changes were compatible
13- - The built file would be under ` lib `
15+ - The built files would be under ` lib `
Original file line number Diff line number Diff line change 66 "scripts" : {
77 "build" : " tsup" ,
88 "start" : " node lib/index.js" ,
9- "sync:deps" : " node scripts/deps.js" ,
10- "sync:mods" : " git submodule update --init --remote --recursive --rebase"
9+ "sync:deps" : " node scripts/deps.js"
1110 },
1211 "devDependencies" : {
1312 "@types/express" : " ^5.0.3" ,
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ const src = JSON.parse(readFileSync("package.json", "utf8"));
44const ejs = JSON . parse ( readFileSync ( "./ejs/package.json" , "utf8" ) ) ;
55
66for ( const dep in ejs . dependencies ) {
7- if ( dep in src . dependencies ) continue ;
87 src . dependencies [ dep ] = ejs . dependencies [ dep ] ;
98}
109
You can’t perform that action at this time.
0 commit comments