mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-30 20:34:49 +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
|
# From https://github.com/lunarmodules/ldoc/blob/master/.github/workflows/doc.yml
|
||||||
|
|
||||||
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
||||||
name: Build Docs
|
name: Build Lua Docs
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
|
@ -23,9 +23,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Get ldoc_gen
|
- name: Get ldoc_gen
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: Ottatop/ldoc_gen
|
repository: Ottatop/ldoc_gen
|
||||||
path: ./ldoc_gen
|
path: ./ldoc_gen
|
||||||
|
@ -47,4 +47,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./ldoc_gen/.ldoc_gen/doc
|
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
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
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
|
- name: Get dependencies
|
||||||
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev
|
run: sudo apt update && sudo apt install libwayland-dev libxkbcommon-dev libudev-dev libinput-dev libgbm-dev libseat-dev libsystemd-dev
|
||||||
- name: Build
|
- 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…
Add table
Reference in a new issue