hopsflow/.github/workflows/default.yml

41 lines
948 B
YAML
Raw Normal View History

2021-12-07 13:37:35 +01:00
name: CI
on:
push:
branches:
2021-12-07 13:38:53 +01:00
- main
2021-12-07 13:37:35 +01:00
jobs:
2021-12-07 13:41:02 +01:00
build-docs:
2021-12-07 13:37:35 +01:00
runs-on: ubuntu-latest
2021-12-10 11:06:57 +01:00
environment: actions
2021-12-07 13:37:35 +01:00
steps:
2021-12-07 13:47:12 +01:00
- uses: actions/checkout@v2
2021-12-10 11:07:52 +01:00
- uses: cachix/install-nix-action@v15
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
2021-12-10 11:03:12 +01:00
- uses: cachix/cachix-action@v10
2021-12-07 14:48:32 +01:00
with:
2021-12-10 11:03:12 +01:00
name: hops
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
2021-12-10 11:09:12 +01:00
- run: nix build
2021-12-07 17:24:20 +01:00
- run: nix develop -c bash -c "cd docs && make html && cd build/html && touch .nojekyll"
2021-12-07 17:14:10 +01:00
2021-12-07 13:54:14 +01:00
- uses: actions/upload-artifact@v2
2021-12-07 13:37:35 +01:00
with:
name: DocumentationHTML
2021-12-07 13:47:12 +01:00
path: docs/build/html/
2021-12-07 13:37:35 +01:00
2021-12-07 13:54:14 +01:00
- name: Publish to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs/build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}