Skip to content

Commit

Permalink
ci: add docs CI
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenceisla committed Dec 19, 2023
1 parent b2c855e commit 4d992f8
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 120 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
- main
- rel-*
tags:
- v*
# Must not take the form vX.Y which is reserved for docs
- v*.*.*
pull_request:
branches:
- main
- rel-*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

# Terminate all previous runs of the same workflow and branch/tag, except for main and release branches/tags
cancel-in-progress: "${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-')) }}"

Expand All @@ -32,7 +33,7 @@ jobs:
# shellcheck disable=SC2046
nix-store -v --realize $( nix-instantiate default.nix )
shell: bash

Lint-Style:
name: Lint & check code style
runs-on: ubuntu-latest
Expand Down Expand Up @@ -102,9 +103,9 @@ jobs:
uses: ./.github/actions/setup-nix
with:
tools: tests withTools
# It seems like they are installing the same set of derivations, so we can assign them the same cache id.
# It seems like they are installing the same set of derivations, so we can assign them the same cache id.
# This would decrease the amount of caches dowloaded on merge cache step and will prevent disk space issues.
cache-id: common
cache-id: common

- name: Run spec tests
if: always()
Expand Down
41 changes: 27 additions & 14 deletions docs/.github/workflows/ci.yaml → .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
name: CI
name: Documentation

on:
push:
branches:
- main
- v*
- main
- rel-*
tags:
- v[0-9]+.[0-9]+
pull_request:
branches:
- main
- v*
- main
- rel-*

jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix-env -f default.nix -iA build
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
tools: docs
cache-id: common
- run: postgrest-docs-build

spellcheck:
name: Run spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix-env -f default.nix -iA spellcheck
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
tools: docs
cache-id: common
- run: postgrest-docs-spellcheck

dictcheck:
name: Run dictcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix-env -f default.nix -iA dictcheck
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
tools: docs
cache-id: common
- run: postgrest-docs-dictcheck

linkcheck:
Expand All @@ -44,7 +55,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- run: nix-env -f default.nix -iA linkcheck
- name: Setup Nix Environment
uses: ./.github/actions/setup-nix
with:
tools: docs
cache-id: common
- run: postgrest-docs-linkcheck

4 changes: 2 additions & 2 deletions docs/.readthedocs.yaml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2
sphinx:
configuration: docs/conf.py
configuration: docs/docs/conf.py
python:
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
build:
os: ubuntu-22.04
tools:
Expand Down
3 changes: 0 additions & 3 deletions docs/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/.github/dependabot.yml

This file was deleted.

3 changes: 0 additions & 3 deletions docs/CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 4d992f8

Please sign in to comment.