Skip to content

Make the server aware of Neovim runtime files 🥲 #875

Make the server aware of Neovim runtime files 🥲

Make the server aware of Neovim runtime files 🥲 #875

Workflow file for this run

name: github pages
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.36"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.0.16"
- name: Cache Cargo
id: cache-cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Cargo
if: steps.cache-cargo.outputs.cache-hit != 'true'
run: |
cargo install mdbook-admonish
cargo install mdbook-tailor
cargo install wasm-pack
cargo install --path ./rs/mdbook-footnote
- name: Build Wasm
run: |
pushd rs/wasm
wasm-pack build --target web
cp pkg/wasm_book.js ../../js
cp pkg/wasm_book_bg.wasm ../../src
pushd
- name: Build Js
run: |
pushd js
sh create-highlight.sh
bun install
bun run build.js
cp -r dist/. ../src/
pushd
- name: Build Scss
run: |
pushd scss
bun install
bun run compile style.scss ../src/css/style.css
bun run compile fonts/fonts.scss ../theme/fonts/fonts.css
bun run compile theme/chrome.scss ../theme/css/chrome.css
bun run compile theme/general.scss ../theme/css/general.css
pushd
- name: Build mdBook
run: |
mdbook build
- name: Remove Unneeded Files
run: |
rm book/ayu-highlight.css
rm book/clipboard.min.js
rm book/highlight.css
rm book/highlight.js
rm book/tomorrow-night.css
rm book/css/variables.css
rm book/mark.min.js
rm -rf book/searchindex.js
rm -rf book/FontAwesome
- name: Generate The Sitemap
id: sitemap
uses: cicirello/generate-sitemap@v1.10.0
with:
path-to-root: ./book
base-url-path: https://coralpink.github.io/commentary/
date-only: true
- name: Sitemap Stats
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book