Skip to content

Commit

Permalink
doc: build and deploy doc from Nix to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarLiner committed Jan 20, 2024
1 parent cc332d6 commit 61ba37c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Documentation
on:
push:
branches: [main]

jobs:
doc:
name: Documentation
runs-on: ubuntu-22.04
steps:
- name: Install Nix
uses: cachix/install-nix-action@v25
- name: Cache Nix derivations
uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: actions/checkout@v2
- name: Fetch all git history
run: git fetch --force --prune --tags --unshallow
- name: Build documentation
run: nix build .#workspace.doc
- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
doc-deploy:
needs: doc
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
use az::CastFrom;
use num_traits::Zero;
use simba::simd::{AutoSimd, SimdRealField, SimdValue};
Expand Down

0 comments on commit 61ba37c

Please sign in to comment.