Skip to content

Location block for /matrix/media #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
871a063
Location block for /matrix/media
tcpipuk Dec 23, 2024
634c7d9
Linting
tcpipuk Dec 23, 2024
f148915
Line breaks
tcpipuk Dec 23, 2024
ae9a994
Bump docker login version
tcpipuk Dec 23, 2024
81ded83
Remove extraneous Docker step
tcpipuk Dec 23, 2024
4f15d3a
Fix Catppuccin theme
tcpipuk Dec 23, 2024
6deb73a
Make sure Docker image builds
tcpipuk Dec 23, 2024
ec600ed
Use mdbook binaries
tcpipuk Dec 23, 2024
12622ed
Use MUSL builds
tcpipuk Dec 23, 2024
e883128
Fixed URLs
tcpipuk Dec 23, 2024
863d4da
Separate build steps
tcpipuk Dec 23, 2024
430a97e
Rename files
tcpipuk Dec 23, 2024
9aafeb4
Add version to filename
tcpipuk Dec 23, 2024
ed5578d
Build footnote
tcpipuk Dec 23, 2024
89b9f1a
Caching and correct graphviz URL
tcpipuk Dec 23, 2024
998e9ed
Correct sccache version
tcpipuk Dec 23, 2024
19ae95c
Update sccache action
tcpipuk Dec 23, 2024
6d2e0b6
Update swatinem action version
tcpipuk Dec 23, 2024
3431e16
Manually install sccache
tcpipuk Dec 23, 2024
4b32a22
Juggling sccache
tcpipuk Dec 23, 2024
8b0ea01
Checkout source for Cargo.toml
tcpipuk Dec 23, 2024
0d9c12f
Correct sccache path
tcpipuk Dec 23, 2024
2bd2014
Use proper GH cache
tcpipuk Dec 23, 2024
8b54dc8
Oops
tcpipuk Dec 23, 2024
e621771
Remove extra cache step
tcpipuk Dec 23, 2024
3457f79
Debug graphviz
tcpipuk Dec 23, 2024
a622f42
Correct graphviz version
tcpipuk Dec 23, 2024
4f0c82e
Don't mdbook init
tcpipuk Dec 23, 2024
fb6ee4d
Conditional build of footnote
tcpipuk Dec 23, 2024
f14e4b2
Better cache check
tcpipuk Dec 23, 2024
90ca613
Catppuccin testing
tcpipuk Dec 23, 2024
b0f5e88
Rebuild graphviz
tcpipuk Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/build-docker.yml

This file was deleted.

194 changes: 194 additions & 0 deletions .github/workflows/deploy-mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
name: Deploy mdBook Site to Pages

on:
push:
branches:
- "*"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
SCCACHE_VERSION: "0.9.0"
MDBOOK_VERSION: "0.4.43"
MDBOOK_ADMONISH_VERSION: "1.15.0"
MDBOOK_GRAPHVIZ_VERSION: "0.2.1"
MDBOOK_MERMAID_VERSION: "0.13.0"

permissions:
contents: read
id-token: write
pages: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build-deps:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Check for existing mdbook-footnote
id: check-footnote
run: |
if [ -f ~/.cargo/bin/mdbook-footnote ]; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "mdbook-footnote binary found, will skip build"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "mdbook-footnote binary not found, will build"
fi

- name: Build mdbook-footnote
if: steps.check-footnote.outputs.exists != 'true'
run: cargo install mdbook-footnote

- name: Check for existing mdbook-graphviz
id: check-graphviz
run: |
if [ -f ~/.cargo/bin/mdbook-graphviz ]; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "mdbook-graphviz binary found, will skip build"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "mdbook-graphviz binary not found, will build"
fi

- name: Build mdbook-graphviz
if: steps.check-graphviz.outputs.exists != 'true'
run: cargo install mdbook-graphviz --version ${MDBOOK_GRAPHVIZ_VERSION}

- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: mdbook-plugins
path: |
~/.cargo/bin/mdbook-footnote
~/.cargo/bin/mdbook-graphviz
retention-days: 1

deploy-mdbook:
needs: build-deps
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Install System Dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends graphviz

- name: Install mdBook
run: |
wget -qO mdbook.tar.gz \
"https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
sudo tar xf mdbook.tar.gz -C /usr/local/bin
rm -rf mdbook.tar.gz

- name: Install mdbook-admonish
run: |
wget -qO admonish.tar.gz \
"https://github.com/tommilligan/mdbook-admonish/releases/download/v${MDBOOK_ADMONISH_VERSION}/mdbook-admonish-v${MDBOOK_ADMONISH_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
sudo tar xf admonish.tar.gz -C /usr/local/bin
rm -rf admonish.tar.gz

- name: Download mdbook plugins
uses: actions/download-artifact@v4
with:
name: mdbook-plugins
path: /usr/local/bin

- name: Make plugins executable
run: |
sudo chmod +x /usr/local/bin/mdbook-footnote
sudo chmod +x /usr/local/bin/mdbook-graphviz

- name: Install mdbook-mermaid
run: |
wget -qO mermaid.tar.gz \
"https://github.com/badboy/mdbook-mermaid/releases/download/v${MDBOOK_MERMAID_VERSION}/mdbook-mermaid-v${MDBOOK_MERMAID_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
sudo tar xf mermaid.tar.gz -C /usr/local/bin
rm -rf mermaid.tar.gz

- name: Prepare Assets Directories
run: mkdir -p src/fonts src/assets theme

- name: Setup Catppuccin Theme
run: |
# Create theme directory
mkdir -p theme

# Download latest Catppuccin theme
curl -sSfL -o theme/catppuccin.css \
https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin.css

# Download Catppuccin admonish theme
curl -sSfL -o theme/catppuccin-admonish.css \
https://github.com/catppuccin/mdBook/releases/latest/download/catppuccin-admonish.css

# Download default theme's index.hbs for customization
curl -sSfL -o theme/index.hbs \
https://raw.githubusercontent.com/rust-lang/mdBook/master/src/theme/index.hbs

# Update index.hbs theme options
sed -i 's/Light/Latte/; s/Rust/Frappé/; s/Coal/Macchiato/; s/Navy/Mocha/; /Ayu/d' theme/index.hbs

- name: Download Additional Assets
run: |
# Devicon Fonts and CSS
curl -sSf \
-o devicon.min.css \
https://raw.githubusercontent.com/devicons/devicon/master/devicon.min.css
curl -sSf \
-o src/fonts/devicon.eot \
https://raw.githubusercontent.com/devicons/devicon/master/fonts/devicon.eot
curl -sSf \
-o src/fonts/devicon.svg \
https://raw.githubusercontent.com/devicons/devicon/master/fonts/devicon.svg
curl -sSf \
-o src/fonts/devicon.ttf \
https://raw.githubusercontent.com/devicons/devicon/master/fonts/devicon.ttf
curl -sSf \
-o src/fonts/devicon.woff \
https://raw.githubusercontent.com/devicons/devicon/master/fonts/devicon.woff

# WhichLang Assets
curl -sSf \
-o src/assets/whichlang.css \
https://raw.githubusercontent.com/phoenixr-codes/mdbook-whichlang/master/src/whichlang.css
curl -sSf \
-o src/assets/whichlang.js \
https://raw.githubusercontent.com/phoenixr-codes/mdbook-whichlang/master/dist/whichlang.js

- name: Build the mdBook Site
run: mdbook build

- name: Turn off Jekyll
run: touch book/.nojekyll

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
116 changes: 0 additions & 116 deletions .github/workflows/update-mdbook.yml

This file was deleted.

Loading