Skip to content
Draft
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
94 changes: 94 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Docs

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-docs:
name: "Build Docs"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.12"]
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.41.4
cache: true

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: install tinytex
run: |
quarto install tinytex

- name: Compile docstrings with quartodoc
run: |
pixi run docs-build

- name: Render docs
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
pixi run docs-render -- --no-cache
else
pixi run docs-render
fi

- name: Save docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html-${{ matrix.python-version }}
path: docs/_site

publish-docs:
name: "Publish Docs"
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
needs: ["build-docs"]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-html-3.12
path: docs/_site

- name: Publish docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site

preview-docs:
name: "Preview Docs"
runs-on: ubuntu-latest
needs: ["build-docs"]
if: github.event_name == 'pull_request'
steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-html-3.12
path: docs/_site
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-preview
path: docs/_site
21 changes: 21 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
lint-docs:
name: "Lint Docs"
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Lint markdown files
run: markdownlint docs/*.md
6 changes: 2 additions & 4 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/.quarto/
site_libs/
_site/
search.json
objects.json
.quarto/
reference/
*.swp
9 changes: 3 additions & 6 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project:
type: website
output-dir: _site
freeze: auto

execute:
# point quarto to the correct python environment
python: "/pyfixest/.pixi/envs/docs/Scripts/python.exe"
exclude:
- "compare-fixest-pyfixest.qmd"

metadata-files:
- _sidebar.yml
Expand Down Expand Up @@ -47,8 +47,6 @@ website:
text: "On Small Sample Corrections"
- file: quantile-regression.qmd
text: "Quantile Regression"
- text: "Compare fixest & PyFixest"
file: compare-fixest-pyfixest.qmd
- text: "Compare Stata & PyFixest"
file: stata-2-pyfixest.qmd
- text: "PyFixest on the GPU"
Expand Down Expand Up @@ -103,7 +101,6 @@ quartodoc:
- report.dtable
- report.coefplot
- report.iplot
- did.visualize.panelview
- title: Misc / Utilities
desc: |
PyFixest internals and utilities
Expand Down
1 change: 0 additions & 1 deletion docs/_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ website:
- reference/report.dtable.qmd
- reference/report.coefplot.qmd
- reference/report.iplot.qmd
- reference/did.visualize.panelview.qmd
section: Summarize and Visualize
- contents:
- reference/estimation.demean.qmd
Expand Down
Loading
Loading