Merge pull request #217 from RustPython/travis-demo

CI build and deploy demo page on master branch
This commit is contained in:
Windel Bouwman
2018-12-07 10:15:50 +01:00
committed by GitHub
2 changed files with 40 additions and 10 deletions

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
wasm/release.sh Normal file
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"