Skip to content

Commit b5c1990

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

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.travis.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,43 @@ matrix:
6767
cache: cargo
6868
script:
6969
- cargo doc --no-deps --all
70+
if: branch = release
7071
env:
7172
- REGULAR_TEST=false
7273
- PUBLISH_DOC=true
74+
- name: WASM online demo
75+
language: rust
76+
rust: nightly
77+
cache: cargo
78+
script:
79+
- cd wasm
80+
- bash release.sh
81+
if: branch = release
82+
env:
83+
- REGULAR_TEST=false
84+
- PUBLISH_DEMO=true
7385
allow_failures:
7486
- rust: nightly
7587
env: REGULAR_TEST=true
7688

7789
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
90+
- provider: pages
91+
repo: RustPython/website
92+
target-branch: master
93+
local-dir: target/doc
94+
skip-cleanup: true
95+
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
96+
keep-history: true
97+
on:
98+
branch: release
99+
condition: $PUBLISH_DOC = true
100+
- provider: pages
101+
repo: RustPython/demo
102+
target-branch: master
103+
local-dir: wasm/app/dist
104+
skip-cleanup: true
105+
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
106+
keep-history: true
107+
on:
108+
branch: release
109+
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)