Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host documentation #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Rust
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: Rust
name: Publish Rust documentation to GitHub pages

And perhaps rename the file as well?


on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
Comment on lines +5 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
branches: [ "master" ]
pull_request:
branches: [ "master" ]
branches: [master]
pull_request:
branches: [master]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These permissions can perhaps be moved to the deploy job: https://github.com/actions/deploy-pages


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

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Document
run: cargo doc --verbose
- name: Packaging
run: mv target/doc _site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
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@v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.