CI build and deploy demo page on master branch

This commit is contained in:
Shing Lyu committed 2018-12-06 20:35:53 +01:00
1 parent fa89e8803c
commit b5c1990267
2 files changed
+40 -10

No files matched your search

+32 -10
View File
@@ -67,21 +67,43 @@ matrix:
cache: cargo
script:
- cargo doc --no-deps --all
if: branch = release
env:
- REGULAR_TEST=false
- PUBLISH_DOC=true
- name: WASM online demo
language: rust
rust: nightly
cache: cargo
script:
- cd wasm
- bash release.sh
if: branch = release
env:
- REGULAR_TEST=false
- PUBLISH_DEMO=true
allow_failures:
- rust: nightly
env: REGULAR_TEST=true
deploy:
provider: pages
repo: RustPython/website
target-branch: master
local-dir: target/doc
skip-cleanup: true
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
on:
branch: master
condition: $PUBLISH_DOC = true
- provider: pages
repo: RustPython/website
target-branch: master
local-dir: target/doc
skip-cleanup: true
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
on:
branch: release
condition: $PUBLISH_DOC = true
- provider: pages
repo: RustPython/demo
target-branch: master
local-dir: wasm/app/dist
skip-cleanup: true
github-token: $WEBSITE_GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
on:
branch: release
condition: $PUBLISH_DEMO = true
+8
View File
@@ -0,0 +1,8 @@
wasm-pack build && \
cd pkg && \
npm link && \
cd ../app && \
npm install && \
npm link rustpython_wasm && \
webpack --mode production && \
echo "Output saved to app/dist"