58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
# by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
|
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
runs-on: native
|
|
|
|
steps:
|
|
# - name: Install Nix
|
|
# uses: DeterminateSystems/nix-installer-action@main
|
|
# with:
|
|
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
# extra-conf: |
|
|
# extra-experimental-features = nix-command flakes pipe-operators
|
|
#
|
|
# - name: Set up cache
|
|
# uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
|
- name: Build docs
|
|
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs --no-write-lock-file
|
|
|
|
- name: Prepare docs for upload
|
|
run: cp -r --dereference --no-preserve=mode,ownership result/ public/
|
|
|
|
# - name: Upload artifact
|
|
# uses: actions/upload-pages-artifact@v3
|
|
# with:
|
|
# path: public/
|
|
|
|
# deploy:
|
|
# name: Deploy
|
|
#
|
|
# needs: build
|
|
#
|
|
# permissions:
|
|
# pages: write
|
|
# id-token: write
|
|
#
|
|
# environment:
|
|
# name: github-pages
|
|
# url: ${{ steps.deployment.outputs.page_url }}
|
|
#
|
|
# runs-on: ubuntu-latest
|
|
#
|
|
# steps:
|
|
# - name: Deploy docs to GitHub Pages
|
|
# id: deployment
|
|
# uses: actions/deploy-pages@v4
|