-
Notifications
You must be signed in to change notification settings - Fork 11
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
7cd3765
commit 4223058
Showing
2 changed files
with
60 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Docs | ||
on: | ||
push: | ||
branches: [main, dev] | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: deploy | ||
cancel-in-progress: false | ||
jobs: | ||
build-docs: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Update apt | ||
run: sudo apt update | ||
- name: Install dependencies. | ||
run: sudo apt-get install libwayland-dev libudev-dev libseat-dev seatd libsystemd-dev libxkbcommon-dev -y | ||
- name: Sanity test | ||
run: pkg-config --libs --cflags "libseat" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: Configure cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Setup pages | ||
id: pages | ||
uses: actions/configure-pages@v4 | ||
- name: Clean docs folder | ||
run: cargo clean --doc | ||
- name: Build docs | ||
run: cargo doc --no-deps | ||
- name: Add redirect | ||
run: echo '<meta http-equiv="refresh" content="0;url=aoc/index.html">' > target/doc/index.html | ||
- name: Remove lock file | ||
run: rm target/doc/.lock | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: target/doc | ||
deploy: | ||
name: Deploy | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-docs | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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