8000 CI build and deploy demo page on master branch · RustPython/RustPython@a973697 · GitHub
[go: up one dir, main page]

Skip to content

Commit a973697

Browse files
committed
CI build and deploy demo page on master branch
1 parent fa89e88 commit a973697

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

.travis.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,38 @@ matrix:
7070
env:
7171
- REGULAR_TEST=false
7272
- PUBLISH_DOC=true
73+
- name: WASM online demo
74+
language: rust
75+
rust: nightly
76+
cache: cargo
77+
script:
78+
- cd wasm
79+
- bash release.sh
80+
env:
81+
- REGULAR_TEST=false
82+
- PUBLISH_DEMO=true
7383
allow_failures:
7484
- rust: nightly
7585
env: REGULAR_TEST=true
7686

7787
deploy:
78-
provider: pages
79-
repo: RustPython/website
80-
target-branch: master
81-
local-dir: target/doc
82-
skip-cleanup: true
83-
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
84-
keep-history: true
85-
on:
86-
branch: master
87-
condition: $PUBLISH_DOC = true
88+
- provider: pages
89+
repo: RustPython/website
90+
target-branch: master
91+
local-dir: target/doc
92+
skip-cleanup: true
93+
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
94+
keep-history: true
95+
on:
96+
branch: master
97+
condition: $PUBLISH_DOC = true
98+
- provider: pages
99+
repo: RustPython/demo
100+
target-branch: master
101+
local-dir: wasm/app/dist
102+
skip-cleanup: true
103+
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
104+
keep-history: true
105+
on:
106+
branch: master
107+
condition: $PUBLISH_DEMO = true

wasm/release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
wasm-pack build && \
2+
cd pkg && \
3+
npm link && \
4+
cd ../app && \
5+
npm install && \
6+
npm link rustpython_wasm && \
7+
webpack --mode production && \
8+
echo "Output saved to app/dist"

0 commit comments

Comments
 (0)
0