Avoid reloading the "add mods" screen every time it is clicked #27
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: "Compile and deploy" | |
on: | |
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-r26c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang | |
AR_aarch64-linux-android: /home/runner/android-ndk-r26c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar | |
BASE_URL: "/ModsBeforeFriday" | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: aarch64-linux-android | |
- uses: mskelton/setup-yarn@v1 | |
with: | |
node-version: '20.x' | |
- name: Download NDK | |
run: wget https://dl.google.com/android/repository/android-ndk-r26c-linux.zip -q -O ndk.zip | |
- name: Extract NDK | |
run: unzip ndk.zip -d /home/runner/ | |
- name: Create cargo config | |
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 | |
run: cat /home/runner/.cargo/config.toml | |
- name: Build agent | |
run: cargo build --manifest-path=mbf-agent/Cargo.toml --target aarch64-linux-android --release | |
- name: Copy agent | |
run: cp ./mbf-agent/target/aarch64-linux-android/release/mbf-agent ./mbf-site/public/mbf-agent | |
- name: yarn install | |
run: yarn --cwd ./mbf-site install | |
- name: yarn build | |
run: 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 |