Skip to content

Commit

Permalink
Add GitHub pages CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammy99jsp committed Aug 22, 2024
1 parent 7cd3765 commit 4223058
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
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
7 changes: 6 additions & 1 deletion .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ on:
jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
security-events: write
steps:
# Necessary for the dependencies.
- 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: Checkout code
uses: actions/checkout@v2

Expand Down

0 comments on commit 4223058

Please sign in to comment.