mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
5f8c1a4634
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [peaceiris/actions-mdbook](https://togithub.com/peaceiris/actions-mdbook) | action | major | `v1` -> `v2` | --- ### Release Notes <details> <summary>peaceiris/actions-mdbook (peaceiris/actions-mdbook)</summary> ### [`v2`](https://togithub.com/peaceiris/actions-mdbook/compare/v1...v2) [Compare Source](https://togithub.com/peaceiris/actions-mdbook/compare/v1...v2) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/agbrs/agb). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
name: Build and Deploy Website
|
|
|
|
on:
|
|
merge_group:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build website
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: gacts/install-podman@v1
|
|
- name: Set CARGO_TARGET_DIR
|
|
run: echo "CARGO_TARGET_DIR=$HOME/target" >> $GITHUB_ENV
|
|
- name: Install build tools
|
|
run: sudo apt-get update && sudo apt-get install build-essential libelf-dev zip -y
|
|
- uses: actions/checkout@v4
|
|
- name: Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
website/agb/node_modules
|
|
website/agb/.next/cache
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}--npm--${{ hashFiles('**/package-lock.json') }}
|
|
- uses: extractions/setup-just@v2
|
|
- name: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@v2
|
|
with:
|
|
mdbook-version: "0.4.13"
|
|
- name: Build website
|
|
run: just build-site
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: "website/build"
|
|
deploy:
|
|
name: Deploy website
|
|
if: github.event_name == 'push'
|
|
# Add a dependency to the build job
|
|
needs: build
|
|
|
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
permissions:
|
|
pages: write # to deploy to Pages
|
|
id-token: write # to verify the deployment originates from an appropriate source
|
|
|
|
# Deploy to the github-pages environment
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
# Specify runner + deployment step
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|