Skip to content

Commit

Permalink
Upload documentation to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
msk committed Feb 23, 2024
1 parent 664ba9d commit b6dc339
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Documentation

on:
push:
branches: [pages]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build documentation
run: cargo doc --no-deps
- name: Fix permissions
run: chmod a+r target/doc/.lock
- name: Create the root index
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=oinq\">" > target/doc/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./target/doc

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit b6dc339

Please sign in to comment.