diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4939aa..720f5fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..35e9f01 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 diff --git a/src/lib.rs b/src/lib.rs index d367f7a..4ddf8b6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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.