Deploy Next.js site to Pages #7
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 * * *' | |
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 | |
- name: Download and install Trunk | |
run: cargo install trunk --locked | |
- 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 }} |