👽💄 update style for bevy 0.12 changes #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
jobs: | |
build_and_deploy_main: | |
name: Rust project for main branch | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: jetli/wasm-pack-action@v0.3.0 | |
with: | |
version: "latest" | |
- run: wasm-pack build --features=web3 --target web | |
- run: ls | |
- name: copy page | |
run: | | |
mkdir public | |
cp index.html ./public | |
cp replay.html ./public | |
cp -r assets/ ./public | |
cp index.css ./public | |
mv pkg ./public | |
rm ./public/pkg/.gitignore | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./public | |
keep_files: true | |
build_and_deploy_tags: | |
name: Rust project for tags | |
runs-on: ubuntu-20.04 | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: jetli/wasm-pack-action@v0.3.0 | |
with: | |
version: "latest" | |
- run: wasm-pack build --features=web3 --target web | |
- run: ls | |
- name: copy page | |
run: | | |
mkdir -p ./public/${GITHUB_REF##*/} | |
cp index.html ./public/${GITHUB_REF##*/} | |
cp replay.html ./public/${GITHUB_REF##*/} | |
cp -r assets/ ./public/${GITHUB_REF##*/} | |
cp index.css ./public/${GITHUB_REF##*/} | |
mv pkg ./public/${GITHUB_REF##*/} | |
rm ./public/${GITHUB_REF##*/}/pkg/.gitignore | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./public | |
keep_files: true | |
build_and_deploy_contracts_app: | |
name: contracts_app for main branch | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: jetli/wasm-pack-action@v0.3.0 | |
with: | |
version: "latest" | |
- run: cargo install --locked trunk | |
- run: cd contracts/flyconomy_contracts_app && trunk build --release --public-url /flyconomy/contracts-app/ | |
- run: mkdir dist/ && mv contracts/flyconomy_contracts_app/dist dist/contracts-app | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./dist | |
keep_files: true |