commit 2014bd8ee16927a156c42439828852d07994be76 Author: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Sun Jul 27 16:40:29 2025 +0200 build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b499649 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build +on: + workflow_dispatch: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "Create root directory" + run: mkdir ./www-root + - name: Run the build + run: ./build.sh + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: www-root + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..37d04b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/doc +/rust diff --git a/before.html b/before.html new file mode 100644 index 0000000..d72cce0 --- /dev/null +++ b/before.html @@ -0,0 +1,29 @@ + diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..9a3dc40 --- /dev/null +++ b/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +root=$(realpath "$PWD") + +# use a higher depth because bootstrap might be broken with depth 1? +git clone --depth 50 https://github.com/rust-lang/rust.git +cd rust + +./configure \ + --set llvm.download-ci-llvm=true \ + --set rust.download-rustc=true + +targets=(x86_64-unknown-linux-gnu x86_64-pc-windows-msvc aarch64-apple-darwin) + +for target in "${targets[@]}"; do + echo "Building $target" + + export RUSTDOCFLAGS="--document-private-items \ + --document-hidden-items \ + --html-before-content=$root/before.html \ + --extend-css=$root/style.css" + + ./x doc library --target "$target" + + mkdir "$root/www-root/$target" + cp -r "./build/$target/doc" "$root/www-root/$target" +done diff --git a/style.css b/style.css new file mode 100644 index 0000000..2a046a9 --- /dev/null +++ b/style.css @@ -0,0 +1,9 @@ +._internal-info { + background-color: red; + color: white; + font-weight: 600; + + display: flex; + flex-direction: column; + justify-content: center; +}