Fix actions #6
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: CI | |
on: | |
pull_request: | |
merge_group: | |
push: | |
jobs: | |
markdownlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Full git history is needed to get a proper list of changed files within `super-linter` | |
fetch-depth: 0 | |
- name: Run Markdown Lint | |
uses: docker://ghcr.io/github/super-linter:slim-v4 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
VALIDATE_MARKDOWN: true | |
DEFAULT_BRANCH: main | |
build-luminol: | |
needs: [markdownlint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Clone Luminol" | |
run: > | |
cd 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.7/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: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: luminol-build | |
path: ${{ github.workspace }}/static/luminol-build | |
build-website: | |
runs-on: ubuntu-latest | |
needs: [markdownlint, build-luminol] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: luminol-build | |
path: static/luminol-build | |
- name: "Build website" | |
uses: shalzz/[email protected] | |
env: | |
PAGES_BRANCH: gh-pages | |
BUILD_DIR: . | |
BUILD_ONLY: true | |
TOKEN: fake-secret |