-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Deploy docs to GitHub Pages using GitHub Actions
- Loading branch information
Showing
4 changed files
with
61 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters