kanidm/.github/workflows/kanidm_individual_book.yml
dependabot[bot] 4049cb0a3a
Bump mozilla-actions/sccache-action from 0.0.5 to 0.0.6 in the all group (#3075)
Bumps the all group with 1 update: [mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action).


Updates `mozilla-actions/sccache-action` from 0.0.5 to 0.0.6
- [Release notes](https://github.com/mozilla-actions/sccache-action/releases)
- [Commits](https://github.com/mozilla-actions/sccache-action/compare/v0.0.5...v0.0.6)

---
updated-dependencies:
- dependency-name: mozilla-actions/sccache-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 08:22:18 +10:00

89 lines
2.4 KiB
YAML

---
name: "Github Pages - Branch"
"on":
workflow_call:
inputs:
# the target tag for generating things
tag:
required: true
type: string
# the parent workflow for caching
parent_id:
required: true
type: string
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
ACTIONS_RUNNER_DEBUG: true
jobs:
generate_mdbook:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.6
with:
version: "v0.4.2"
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
build-essential \
librust-openssl-dev \
libssl-dev \
libudev-dev \
libpam0g-dev
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: "latest"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build the docs
# pinning mdbook-alerts because of <https://github.com/lambdalisue/rs-mdbook-alerts/issues/79>
run: |
cargo install mdbook-alerts --version 0.6.4
cargo install mdbook-mermaid
cargo doc --no-deps
mdbook build *book
rm -rf ./docs/
mkdir -p ./docs/
mv ./*book/book ./docs/${{ inputs.tag }}
mkdir -p ./docs/${{ inputs.tag }}/rustdoc/
find ./target/doc/ -name .lock -exec rm "{}" \;
mv ./target/doc/* ./docs/${{ inputs.tag }}/rustdoc/
- name: pykanidm docs
run: |
python -m pip install poetry
cd pykanidm
poetry install
poetry run mkdocs build
cd ..
mv pykanidm/site ./docs/${{ inputs.tag }}/pykanidm
continue-on-error: true
- name: archive things
run: |
tar czvf ${{ inputs.tag }}.tar.gz ./docs/
env:
ACTIONS_RUNNER_DEBUG: true
- name: Upload artifact
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v4
with:
name: "individual${{ inputs.tag }}"
path: ${{ inputs.tag }}.tar.gz
env:
ACTIONS_RUNNER_DEBUG: true