2023-04-15 08:44:12 +00:00
|
|
|
name: "Build and deploy documentation"
|
2023-02-01 19:11:37 +00:00
|
|
|
on:
|
2023-02-06 19:02:44 +00:00
|
|
|
workflow_dispatch:
|
2023-02-01 19:11:37 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-10-01 13:17:48 +00:00
|
|
|
paths:
|
2023-02-16 19:01:59 +00:00
|
|
|
# build the manuals only when docs directory is updated
|
|
|
|
- docs/**
|
2023-02-01 19:11:37 +00:00
|
|
|
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
# Allow one concurrent deployment
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-10-20 09:04:31 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-10-01 13:17:48 +00:00
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
- name: Install Nix
|
|
|
|
uses: cachix/install-nix-action@v18
|
2023-10-01 13:17:48 +00:00
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-02-06 19:02:44 +00:00
|
|
|
nix build '.#docs'
|
2023-02-01 19:11:37 +00:00
|
|
|
cp -r result/share/doc/neovim-flake public
|
2023-10-01 13:17:48 +00:00
|
|
|
|
2023-02-01 19:11:37 +00:00
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./public
|