Skip to content

Commit

Permalink
ci: Deploy docs to GitHub Pages using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nspin committed Jul 30, 2023
1 parent f9346c1 commit 3f24f7f
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 32 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/check.yaml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "CI"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build-and-check:
name: Build and check
runs-on: ubuntu-latest
steps:
- name: Prepare to maximize build space
run: sudo mkdir /nix
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
build-mount-path: /nix
root-reserve-mb: 8192
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: coliasgroup
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build and check
run: make -C hacking/ci/github-actions check
- name: Expose docs
run: make -C hacking/ci/github-actions docs
- name: Upload Pages artifact
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: actions/upload-pages-artifact@v2
with:
path: out/html
deploy-docs:
name: Deploy docs
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
needs: build-and-check
permissions:
pages: write
id-token: write
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@v2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This work is funded by the [seL4 Foundation](https://sel4.systems/Foundation/hom

### Rendered rustdoc

[https://coliasgroup.com/rust-seL4-html/](https://coliasgroup.com/rust-seL4-html/)
[https://coliasgroup.com/rust-seL4/](https://coliasgroup.com/rust-seL4/)

### Overview of crates

Expand Down
4 changes: 4 additions & 0 deletions hacking/ci/github-actions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ check:

# For debugging and monitoring disk usage
# ($(MAKE) -C $(root_dir) check-oneshot && df -h) || (df -h && false)

.PHONY: docs
docs:
$(MAKE) -C $(root_dir) html

0 comments on commit 3f24f7f

Please sign in to comment.