Merge pull request #1189 from c-bata/fix-dockerfile #450
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
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'optuna/optuna-dashboard' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchains | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build rustlib for standalone_app | |
| working-directory: rustlib | |
| run: | | |
| WASM_BINDGEN_VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "wasm-bindgen") | .version') | |
| cargo install wasm-bindgen-cli --version $WASM_BINDGEN_VERSION | |
| cargo install wasm-opt | |
| ./build.sh | |
| - name: Build tslib | |
| run: make tslib | |
| - name: Build standalone_app | |
| working-directory: standalone_app | |
| run: | | |
| npm install | |
| npx vite build --base=/optuna-dashboard/ --outDir ./gh-pages | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './standalone_app/gh-pages' | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'optuna/optuna-dashboard' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |