mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-18 22:26:12 +01:00
Add rustdoc workflow, add caching to rust workflow maybe
This commit is contained in:
parent
d1ee24894b
commit
0c457a4ec6
3 changed files with 43 additions and 5 deletions
8
.github/workflows/ldoc.yml
vendored
8
.github/workflows/ldoc.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
# From https://github.com/lunarmodules/ldoc/blob/master/.github/workflows/doc.yml
|
||||
|
||||
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
||||
name: Build Docs
|
||||
name: Build Lua Docs
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
|
@ -23,9 +23,9 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Get ldoc_gen
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: Ottatop/ldoc_gen
|
||||
path: ./ldoc_gen
|
||||
|
@ -47,4 +47,4 @@ jobs:
|
|||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./ldoc_gen/.ldoc_gen/doc
|
||||
destination_dir: ${{ env.BRANCH_NAME }}
|
||||
destination_dir: ${{ env.BRANCH_NAME }}/lua
|
||||
|
|
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
|
@ -14,7 +14,11 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run rustup
|
||||
run: rustup toolchain install stable
|
||||
- name: Cache stuff maybe
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: Get dependencies
|
||||
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev
|
||||
- name: Build
|
||||
|
|
34
.github/workflows/rustdoc.yml
vendored
Normal file
34
.github/workflows/rustdoc.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Build Rust Docs
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "api/rust/**"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "api/rust/**"
|
||||
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build docs
|
||||
run: cd ./api/rust && cargo doc
|
||||
- name: Create index.html
|
||||
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=pinnacle_api\">" > ./api/rust/target/doc/index.html
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./api/rust/target/doc
|
||||
destination_dir: ${{ env.BRANCH_NAME }}/rust
|
Loading…
Reference in a new issue