[rs] Make actions more consistent and use GITHUB_TOKEN

This commit is contained in:
Joshua Groves 2020-06-22 23:23:50 -02:30
parent 6947184d55
commit 7d671389a1
2 changed files with 17 additions and 10 deletions

View File

@ -2,22 +2,24 @@ name: Documentation
on:
push:
branches: [ master ]
branches:
- master
jobs:
bundle:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v1
- name: build documentation
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build the docs
run: cargo doc --lib --all-features
- name: Deploy 🚀
- name: Deploy the docs
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/doc
TARGET_FOLDER: doc

View File

@ -15,25 +15,30 @@ jobs:
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Install Rust WASM toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Build the examples
run: cargo build --release --target wasm32-unknown-unknown --examples
- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
- name: Generate JS bindings for the examples
run: |
for i in target/wasm32-unknown-unknown/release/examples/*.wasm;
do
wasm-bindgen --no-typescript --out-dir target/generated --web "$i";
done
- name: Deploy 🚀
- name: Deploy the examples
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/generated
TARGET_FOLDER: examples