forked from jessebraham/esp-hal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8841d82
commit fab99e2
Showing
3 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,3 +296,41 @@ jobs: | |
run: cargo fmt --all --manifest-path=esp-riscv-rt/Cargo.toml -- --check | ||
- name: rustfmt (examples) | ||
run: cargo fmt --all --manifest-path=examples/Cargo.toml -- --check | ||
|
||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf, riscv32imafc-unknown-none-elf | ||
toolchain: ${{ env.MSRV }} | ||
components: rust-src | ||
|
||
- uses: esp-rs/[email protected] | ||
with: | ||
default: true | ||
ldproxy: false | ||
|
||
- name: Build and Clone Documentation | ||
run: | | ||
CHIPS=("esp32" "esp32c2" "esp32c3" "esp32c6" "esp32h2" "esp32p4" "esp32s2" "esp32s3") | ||
for CHIP in "${CHIPS[@]}"; do | ||
if [ "$CHIP" == "esp32" ] || [ "$CHIP" == "esp32s2" ] || [ "$CHIP" == "esp32s3" ]; then | ||
cargo +esp xtask build-documentation --output-path=docs/"$CHIP"/ esp-hal $CHIP | ||
else | ||
cargo +nightly xtask build-documentation --output-path=docs/"$CHIP"/ esp-hal $CHIP | ||
fi | ||
done | ||
cp resources/esp-rs.svg ${{ github.workspace }} | ||
cp resources/index.html ${{ github.workspace }} | ||
find . -maxdepth 1 -mindepth 1 ! -name 'docs' ! -name '.git' ! -name 'index.html' ! -name 'esp-rs.svg' ! -name '.' -exec rm -rf {} + | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: . |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>esp-rs docs</title> | ||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500&display=swap" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400;1,600&display=swap" rel="stylesheet"> | ||
<style> | ||
body { | ||
background-color: rgb(53, 53, 53); | ||
font-family: 'Fira Sans', sans-serif; | ||
color: white; | ||
margin: 0; | ||
padding: 40px 20px; | ||
display: flex; | ||
height: 100vh; | ||
width: 100vw; | ||
justify-content: center; | ||
box-sizing: border-box; | ||
} | ||
.logo { | ||
text-align: center; | ||
margin-bottom: 50px; | ||
font-size: 2em; | ||
font-weight: 500; | ||
} | ||
.logo img { | ||
width: 100px; | ||
height: auto; | ||
margin-bottom: 20px; | ||
} | ||
.content { | ||
width: 900px; | ||
} | ||
.crate { | ||
display: flex; | ||
align-items: center; | ||
padding: 10px; | ||
border-bottom: 2px solid #454444; | ||
} | ||
.crate-description { | ||
flex: 1; | ||
font-family: 'Source Serif 4', serif; | ||
color: #C0C0C0; | ||
text-align: center; | ||
} | ||
.crate-name { | ||
color: #D6991D; | ||
width: 120px; | ||
} | ||
/* Ensure the link color does not change after being clicked */ | ||
.crate-name a:link, | ||
.crate-name a:visited, | ||
.crate-name a:hover, | ||
.crate-name a:active, | ||
.crate-name a:focus { | ||
color: #D6991D; | ||
} | ||
.crate-version { | ||
color: #C0C0C0; | ||
text-align: center; | ||
width: 120px; | ||
} | ||
|
||
@media screen and (min-height: 650px) { | ||
body { | ||
align-items: center; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
|
||
|
||
<div class="content"> | ||
<div class="logo"> | ||
<img src="esp-rs.svg" alt="esp-rs logo"> | ||
<div>esp-rs docs</div> | ||
</div> | ||
<!-- Crate entry --> | ||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/xtensa-esp32-none-elf/esp32/index.html">esp32-hal</a></span> | ||
<span class="crate-description">Peripheral access API for ESP32 microcontrollers</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/riscv32imc-unknown-none-elf/esp32c2/index.html">esp32c2-hal</a></span> | ||
<span class="crate-description">Peripheral access API for ESP32-C2 microcontrollers</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/riscv32imc-unknown-none-elf/esp32c3/index.html">esp32c3-hal</a></span> | ||
<span class="crate-description">Peripheral access API for ESP32-C3 microcontrollers</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/riscv32imac-unknown-none-elf/esp32c6/index.html">esp32c6-hal</a></span> | ||
<span class="crate-description">Rapidly scaffold out a new tauri app project.</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/riscv32imac-unknown-none-elf/esp32h2/index.html">esp32h2-hal</a></span> | ||
<span class="crate-description">Rapidly scaffold out a new tauri app project.</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/riscv32imafc-unknown-none-elf/esp32p4/index.html">esp32p4-hal</a></span> | ||
<span class="crate-description">Rapidly scaffold out a new tauri app project.</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/xtensa-esp32s2-none-elf/esp32s2/index.html">esp32s2-hal</a></span> | ||
<span class="crate-description">Rapidly scaffold out a new tauri app project.</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
|
||
<div class="crate"> | ||
<span class="crate-name"><a href="documentation/xtensa-esp32s3-none-elf/esp32s3/index.html">esp32s3-hal</a></span> | ||
<span class="crate-description">Rapidly scaffold out a new tauri app project.</span> | ||
<span class="crate-version">0.1.0</span> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |