mirror of
https://github.com/vale981/hopsflow
synced 2025-03-05 08:51:37 -05:00
40 lines
955 B
YAML
40 lines
955 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-docs:
|
|
runs-on: ubuntu-latest
|
|
environment: actions
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v15
|
|
with:
|
|
extra_nix_config: |
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: hops
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
extraPullNames: nix-community
|
|
- run: nix build -L
|
|
- run: nix develop -c bash -c "cd docs && make html && cd build/html && touch .nojekyll"
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: DocumentationHTML
|
|
path: docs/build/html/
|
|
|
|
- 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 }}
|