Skip to content

Merge pull request #35 from jdhoffa/ci/add-ci-to-deploy-documentation #2

Merge pull request #35 from jdhoffa/ci/add-ci-to-deploy-documentation

Merge pull request #35 from jdhoffa/ci/add-ci-to-deploy-documentation #2

Workflow file for this run

name: Docs
on:
push:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo doc --no-deps
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: docs
path: target/doc
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download docs
uses: actions/download-artifact@v3
with:
name: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4