Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,46 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Triggered by the Npgsql and EFCore.PG repos when their docs change
repository_dispatch:
types: [docs-changed]

# Nightly rebuild to pick up API changes
schedule:
- cron: "0 3 * * *"

concurrency:
group: "pages"
cancel-in-progress: false
group: pages-${{ github.ref }}
# Don't cancel in-progress deployments; pending runs are still superseded by the latest one.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
env:
# Build pinned source snapshots for API docs, not dependency auditing.
# Build source snapshots for API docs, not dependency auditing.
NuGetAudit: "false"

steps:
- name: Checkout repo
uses: actions/checkout@v7

- name: Checkout Npgsql
uses: actions/checkout@v7
with:
submodules: true
repository: npgsql/npgsql
ref: main
path: Npgsql

- name: Checkout EFCore.PG
uses: actions/checkout@v7
with:
repository: npgsql/efcore.pg
ref: main
path: EFCore.PG

- name: Use Node.js
uses: actions/setup-node@v7.0.0
Expand Down Expand Up @@ -56,8 +80,13 @@ jobs:
shell: bash
working-directory: EFCore.PG

# Released docfx (2.81.0) bundles an older Roslyn than Npgsql's source generator requires; use the nightly
# until a release with Roslyn 5.12+ ships.
- name: Get docfx
run: dotnet tool install --version 2.81.0 -g docfx
run: |
dotnet nuget add source https://nuget.pkg.github.com/dotnet/index.json -n docfx-nightly \
-u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet tool install -g docfx --prerelease

- name: Build docs
run: docfx --warningsAsErrors
Expand All @@ -70,7 +99,7 @@ jobs:
deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'main'
if: github.event_name != 'pull_request' && github.ref_name == 'main'
permissions:
contents: read
pages: write
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
obj
/Npgsql
/EFCore.PG
/_site
/_exported_templates
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion EFCore.PG
Submodule EFCore.PG deleted from 2679a9
1 change: 0 additions & 1 deletion Npgsql
Submodule Npgsql deleted from 4d1742
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is the documentation repo for Npgsql.

It contains conceptual documentation articles for Npgsql, Npgsql.EntityFrameworkCore.PostgreSQL (AKA EFCore.PG) and EntityFramework6.Npgsql (AKA EF6.PG).
It contains the site shell and the conceptual documentation for EntityFramework6.Npgsql (AKA EF6.PG). The conceptual documentation for Npgsql and Npgsql.EntityFrameworkCore.PostgreSQL (AKA EFCore.PG) lives in the `docs` directory of their respective repos ([npgsql/npgsql](https://github.com/npgsql/npgsql), [npgsql/efcore.pg](https://github.com/npgsql/efcore.pg)).

Note that to properly work, docfx expects to also find the Npgsql and EFCore.PG repos cloned in the repo root - it extracts API documentation from them.
To build locally, clone the Npgsql and EFCore.PG repos into `Npgsql` and `EFCore.PG` in the repo root - docfx takes the conceptual docs from their `docs` directories, and extracts API documentation from their sources.

A Github Actions workflow automatically clones the appropriate repository, rebuilds the entire documentation and pushes the results to live.
A GitHub Actions workflow clones the latest `main` of both repos, rebuilds the entire documentation and pushes the results to live. It runs on pushes to this repo, when the Npgsql or EFCore.PG repos signal a docs change (via `repository_dispatch`), and nightly.
168 changes: 0 additions & 168 deletions conceptual/EFCore.PG/index.md

This file was deleted.

54 changes: 0 additions & 54 deletions conceptual/EFCore.PG/mapping/array.md

This file was deleted.

Loading