Add "ask laurie" description for connection issues #137
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: "Compile and deploy" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ['deploy'] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and deploy site | |
| runs-on: ubuntu-latest | |
| env: | |
| CC_aarch64-linux-android: /home/runner/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang | |
| AR_aarch64-linux-android: /home/runner/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar | |
| BASE_URL: './' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Agent Hash | |
| id: agent_hash | |
| run: | | |
| echo "hash=$(find Cargo.* mbf-agent* mbf-res-man mbf-zip -type f -exec md5sum {} \; | md5sum - | cut -d ' ' -f1)" >> $GITHUB_OUTPUT | |
| - name: Agent Cache | |
| id: agent_cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: mbf-agent-${{ steps.agent_hash.outputs.hash }} | |
| path: | | |
| ./mbf-site/src/agent_manifest.ts | |
| ./mbf-site/public/mbf-agent | |
| - name: Rust target cache | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| key: rust-target-${{ steps.agent_hash.outputs.hash }} | |
| restore-keys: rust-target- | |
| path: | | |
| ./target | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| with: | |
| target: aarch64-linux-android | |
| - name: NDK Cache | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| id: ndk_cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/android-ndk-r27c | |
| key: linux-android-ndk-r27c | |
| - name: Install NDK | |
| if: steps.agent_cache.outputs.cache-hit != 'true' && steps.ndk_cache.outputs.cache-hit != 'true' | |
| run: | | |
| curl -L "https://dl.google.com/android/repository/android-ndk-r27c-linux.zip" -o ndk.zip | |
| unzip ndk.zip -d /home/runner/ | |
| rm ndk.zip | |
| - name: Create cargo config | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| run: | | |
| echo '[target.aarch64-linux-android] | |
| ar = "${{ env.AR_aarch64-linux-android }}" | |
| linker = "${{ env.CC_aarch64-linux-android }}"' > /home/runner/.cargo/config.toml | |
| - name: Output cargo config | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| run: cat /home/runner/.cargo/config.toml | |
| - name: Run agent build script | |
| if: steps.agent_cache.outputs.cache-hit != 'true' | |
| run: ./build_agent.ps1 -Release | |
| shell: pwsh | |
| - name: Site Hash | |
| id: site_hash | |
| run: | | |
| echo "hash=$(find mbf-site -type f -exec md5sum {} \; | md5sum - | cut -d ' ' -f1)" >> $GITHUB_OUTPUT | |
| - name: Site Cache | |
| id: site_cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: mbf-site-${{ steps.site_hash.outputs.hash }} | |
| path: | | |
| mbf-site/dist | |
| - uses: actions/setup-node@v3 | |
| if: steps.site_cache.outputs.cache-hit != 'true' | |
| with: | |
| node-version: 20.x | |
| - name: Modules Cache | |
| if: steps.site_cache.outputs.cache-hit != 'true' | |
| id: modules_cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: site-modules-${{ hashFiles('mbf-site/yarn.lock')}} | |
| path: | | |
| mbf-site/node_modules | |
| - name: yarn install | |
| if: steps.modules_cache.outputs.cache-hit != 'true' && steps.site_cache.outputs.cache-hit != 'true' | |
| run: yarn --cwd ./mbf-site install | |
| - name: yarn build | |
| if: steps.site_cache.outputs.cache-hit != 'true' | |
| run: | | |
| find mbf-site -type f | |
| yarn --cwd ./mbf-site build | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './mbf-site/dist' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |