@@ -59,69 +59,15 @@ jobs:
5959 - name : Set up Node.js
6060 uses : actions/setup-node@v3
6161 with :
62- - node-version : " latest"
63- + node-version : " 18"
64- + cache : ' npm'
65- - with :
66- - node-version : " latest"
67- + # ...existing code...
68-
69- - name : Install dependencies
70- - run : npm ci
71- + run : |
72- + # install root deps
73- + npm ci
74- + # install deps for common/ if present (so common/script/prComment.mjs has its deps)
75- + if [ -f common/package.json ]; then
76- + npm ci --prefix common
77- + fi
78-
79- - name : Update PR coment with preview and diff links
80- run : |
81- node common/script/prComment.mjs \
82- --repo ${{ github.repository }} \
83- --pull_request_number ${{ github.event.pull_request.number }} \
84- --token ${{ secrets.GITHUB_TOKEN }} \
85- --update_pr
86- ```name : Preview
87-
88- on :
89- pull_request :
90- types : [opened, synchronize]
91-
92- jobs :
93- build-and-deploy :
94- # ...existing code...
95- update-pr-links :
96- needs : build-and-deploy
97- if : ${{ needs.build-and-deploy.result == 'success' }}
98- runs-on : ubuntu-latest
99- steps :
100- - name : Checkout repo
101- uses : actions/checkout@v5
102- - name : Set up Node.js
103- uses : actions/setup-node@v3
104- with :
105- - node-version : " latest"
106- + node-version : " 18"
107- + cache : ' npm'
108- - with :
109- - node-version : " latest"
110- + # ...existing code...
62+ node-version : " latest"
63+ cache : ' npm'
11164
11265 - name : Install dependencies
113- run : npm ci axios
66+ run : npm ci
11467 - name : Update PR coment with preview and diff links
11568 run : |
11669 node common/script/prComment.mjs \
11770 --repo ${{ github.repository }} \
11871 --pull_request_number ${{ github.event.pull_request.number }} \
11972 --token ${{ secrets.GITHUB_TOKEN }} \
12073 --update_pr
121- - name : Update PR coment with preview and diff links
122- run : |
123- node common/script/prComment.mjs \
124- --repo ${{ github.repository }} \
125- --pull_request_number ${{ github.event.pull_request.number }} \
126- --token ${{ secrets.GITHUB_TOKEN }} \
127- --update_pr
0 commit comments