Skip to content

Commit 8272e47

Browse files
authored
Merge pull request RustPython#1737 from RustPython/coolreader18/deploy-gh-actions
Deploy the demo using Github Actions
2 parents ddfec3a + 6c3231e commit 8272e47

File tree

2 files changed

+11
-29
lines changed

2 files changed

+11
-29
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [master]
3+
branches: [master, release]
44
pull_request:
55

66
name: CI
@@ -120,7 +120,7 @@ jobs:
120120
cargo run -- -m test -v
121121
122122
wasm:
123-
name: Run wasm selenium tests
123+
name: Check the WASM package and demo
124124
runs-on: ubuntu-latest
125125
steps:
126126
- uses: actions/checkout@master
@@ -148,3 +148,12 @@ jobs:
148148
npm install
149149
npm run test
150150
working-directory: ./wasm/demo
151+
- name: Deploy demo to Github Pages
152+
if: success() && github.ref == 'refs/heads/release'
153+
uses: peaceiris/actions-gh-pages@v2
154+
env:
155+
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
156+
PUBLISH_DIR: ./wasm/demo/dist
157+
EXTERNAL_REPOSITORY: RustPython/demo
158+
PUBLISH_BRANCH: master
159+

.travis.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -102,33 +102,6 @@ jobs:
102102
on:
103103
branch: release
104104

105-
- name: WASM online demo
106-
language: rust
107-
rust: stable
108-
cache: cargo
109-
install:
110-
- nvm install node
111-
# install wasm-pack
112-
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
113-
script:
114-
- cd wasm/demo
115-
- npm install
116-
- npm run dist
117-
if: branch = release
118-
env:
119-
- JOBCACHE=5
120-
deploy:
121-
- provider: pages
122-
repo: RustPython/demo
123-
target-branch: master
124-
local-dir: wasm/demo/dist
125-
skip-cleanup: true
126-
# Set in the settings page of your repository, as a secure variable
127-
github-token: $WEBSITE_GITHUB_TOKEN
128-
keep-history: true
129-
on:
130-
branch: release
131-
132105
- name: Code Coverage
133106
language: python
134107
python: 3.8

0 commit comments

Comments
 (0)