Skip to content

Commit

Permalink
Build Documentation with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
CryZe committed Jun 29, 2023
1 parent ef39302 commit 01e94c8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout Commit
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: hecrj/setup-rust-action@v1
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: hecrj/setup-rust-action@v1
Expand All @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: hecrj/setup-rust-action@v1
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy docs

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
components: rust-docs
rust-version: nightly

- name: Build docs
run: RUSTDOCFLAGS="--cfg doc_cfg" cargo doc --all-features

- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: target/doc
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
missing_docs,
rust_2018_idioms
)]
#![cfg_attr(doc_cfg, feature(doc_auto_cfg))]

//! Helper crate to write auto splitters for LiveSplit One's auto splitting
//! runtime.
Expand Down

0 comments on commit 01e94c8

Please sign in to comment.