Update README.md #25
Workflow file for this run
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: Deploy | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: '0 0 * * SUN' | |
workflow_dispatch: | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2023-11-14 | |
targets: wasm32-unknown-unknown | |
components: rust-src | |
- name: "Clone Luminol" | |
run: cd ${{ github.workspace }}/build-luminol && ./clone_luminol.sh | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
build-luminol/luminol/target/ | |
static/luminol-build/**/*.wasm | |
key: ${{ runner.os }}-build-luminol-${{ hashFiles('build-luminol/luminol/Cargo.toml') }} | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2023-11-14 | |
targets: wasm32-unknown-unknown | |
components: rust-src | |
# Cargo will error if we try to install the same binary multiple times, so we bypass cargo | |
# (No idea why, it doesn't happen in my testing) | |
- name: Download and install Trunk binary | |
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.8/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- -C ~/.cargo/bin | |
- name: Build luminol (Release) | |
run: cd build-luminol && ./build_luminol.sh | |
- name: "Build and deploy website" | |
if: github.repository_owner == 'Astrabit-ST' | |
uses: shalzz/[email protected] | |
env: | |
PAGES_BRANCH: gh-pages | |
BUILD_DIR: . | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} |