Skip to content

refactor(threads): use CPU INTR0 for scheduler on esp (#484) #1

refactor(threads): use CPU INTR0 for scheduler on esp (#484)

refactor(threads): use CPU INTR0 for scheduler on esp (#484) #1

name: Deploy docs
# GitHub Action workflow documentation:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# This workflow is based on
# https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml
on:
push:
branches: main
paths:
- book/**
- src/**
- Cargo.toml
- rust-toolchain.toml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
if: github.repository == 'future-proof-iot/RIOT-rs'
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- id: get_toolchain
run: echo "toolchain=$(scripts/rust-toolchain.sh)" >> $GITHUB_OUTPUT
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.get_toolchain.outputs.toolchain }}
- name: Build rustdoc docs
run: |
cargo doc -p riot-rs --features bench,csprng,executor-thread,external-interrupts,hwrng,i2c,no-boards,random,spi,threading,usb
echo "<meta http-equiv=\"refresh\" content=\"0; url=riot_rs\">" > target/doc/index.html
mkdir -p ./_site/dev/docs/api && mv target/doc/* ./_site/dev/docs/api
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build the book
run: |
cd book
mdbook build
mv book ../_site/dev/docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
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