feat: improve mobile particle picker input #78
Workflow file for this run
This file contains hidden or 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: Deploy WASM to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: | | |
| curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | bash | |
| - name: Run wasm compile checks | |
| run: | | |
| cargo check -p vizmat-core --target wasm32-unknown-unknown --no-default-features | |
| cargo check -p vizmat-app --target wasm32-unknown-unknown --no-default-features | |
| - name: Build WASM | |
| run: | | |
| if [ "${{ github.ref }}" = "refs/heads/main" ]; then | |
| wasm-pack build --target web | |
| else | |
| wasm-pack build --target web --dev | |
| fi | |
| working-directory: vizmat-core | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Install npm dependencies and build | |
| run: | | |
| cp ../../wasm/* . | |
| cp ../../vizmat-app/index.html . | |
| cp ../../vizmat-app/style.css . | |
| npm install | |
| npm run build | |
| working-directory: vizmat-core/pkg | |
| - name: Copy assets | |
| run: | | |
| cp -R ../../vizmat-app/assets/* ./dist/assets/ | |
| working-directory: vizmat-core/pkg | |
| - name: Deploy to gh-pages | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: vizmat-core/pkg/dist | |
| keep_files: false |