Add german wordle list #9
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 | |
| name: Build and test | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Clippy | |
| run: cargo clippy --all-features -- -D warnings | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build | |
| run: cargo build --all-features | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Test | |
| run: cargo test --all-features | |
| ai_website: | |
| runs-on: ubuntu-latest | |
| needs: [clippy, format, build, test] | |
| defaults: | |
| run: | |
| working-directory: wordle_ai_web | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # ----------------------------- | |
| # Install wasm target + Trunk | |
| # ----------------------------- | |
| - name: Add wasm32 target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Install cargo-binstall | |
| run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
| - name: Install Trunk | |
| run: cargo binstall trunk | |
| # ----------------------------- | |
| # Install latest wasm-opt | |
| # ----------------------------- | |
| - name: Install wasm-opt | |
| run: | | |
| WASM_OPT_VERSION=version_124 | |
| curl -L -o binaryen.tar.gz \ | |
| "https://github.com/WebAssembly/binaryen/releases/download/${WASM_OPT_VERSION}/binaryen-${WASM_OPT_VERSION}-x86_64-linux.tar.gz" | |
| tar -xzf binaryen.tar.gz | |
| mv binaryen-${WASM_OPT_VERSION}/bin/wasm-opt ./wasm-opt | |
| chmod +x ./wasm-opt | |
| echo "$(pwd)" >> $GITHUB_PATH | |
| # ----------------------------- | |
| # Build website | |
| # ----------------------------- | |
| - name: Clean project | |
| run: | | |
| trunk clean | |
| cargo clean | |
| - name: Build website | |
| run: trunk build --release --no-sri --verbose | |
| # ----------------------------- | |
| # Optimize WASM files | |
| # ----------------------------- | |
| - name: Optimize WASM | |
| run: | | |
| find dist/ -name "*.wasm" | while read wasm; do | |
| ./wasm-opt -Oz -o "$wasm" "$wasm" | |
| done | |
| # ----------------------------- | |
| # Deploy to Cloudflare Pages | |
| # ----------------------------- | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy wordle_ai_web/dist --project-name=wordle-ai-web |