Skip to content

Commit 0dcb45b

Browse files
Fix deploy
1 parent 5e73779 commit 0dcb45b

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/pxt-deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,36 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v4
22+
with:
23+
repository: microsoft/pxt
24+
path: pxt
25+
- uses: actions/checkout@v4
26+
with:
27+
repository: microsoft/pxt-common-packages
28+
path: pxt-common-packages
2129
- name: Use Node.js ${{ matrix.node-version }}
2230
uses: actions/setup-node@v4
2331
with:
2432
node-version: ${{ matrix.node-version }}
2533
cache: 'npm'
34+
- name: install PXT
35+
run: |
36+
cd pxt
37+
npm install
38+
npm run build
39+
- name: install pxt-common-packages
40+
run: |
41+
cd pxt-common-packages
42+
npm install
2643
- name: npm install
2744
run: npm install
45+
- name: link pxt
46+
run: |
47+
rm -Rf node_modules/pxt-core
48+
rm -Rf node_modules/pxt-common-packages
49+
pxt link ../pxt
50+
pxt link ../pxt-common-packages
2851
# sudo apt-get install xvfb
2952
# sudo npm install -g pxt
3053
# npm install

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx pxt serve --noBrowser -h 0.0.0.0 -p $PORT

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
"scripts": {
5151
"test": "node node_modules/pxt-core/built/pxt.js travis",
5252
"svgo": "glob-exec --foreach \"**/boardhd.svg\" -- \"svgo --config=svgo.yml {{file}} -o {{file.dir}}/board.svg \"",
53-
"build": "chmod +x ./launch.sh",
53+
"build": "chmod +x ./build.sh && ./build.sh",
5454
"gcp-build": "",
55-
"start": "./launch.sh"
55+
"start": "./launch.sh",
56+
"pxt":"pxt"
5657
}
5758
}

0 commit comments

Comments
 (0)