Skip to content

Add doc generation scripts #91

Add doc generation scripts

Add doc generation scripts #91

Workflow file for this run

name: Community Extension Build
on:
pull_request:
push:
jobs:
prepare:
outputs:
COMMUNITY_EXTENSION_NAME: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_NAME }}
COMMUNITY_EXTENSION_GITHUB: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_GITHUB }}
COMMUNITY_EXTENSION_REF: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_REF }}
COMMUNITY_EXTENSION_DEPLOY: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_DEPLOY }}
COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get all changed description files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
extensions/*/description.yml
- name: Parse description files
id: parse
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
pip install pyyaml
python scripts/build.py
cat env.sh >> $GITHUB_OUTPUT
echo `cat $GITHUB_OUTPUT`
build:
needs: prepare
uses: ./.github/workflows/_extension_distribution.yml
if: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME != '' }}
with:
duckdb_version: v1.0.0
exclude_archs: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
extension_name: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME }}
repository: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_GITHUB }}
ref: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_REF }}
deploy:
needs:
- prepare
- build
uses: ./.github/workflows/_extension_deploy.yml
if: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_DEPLOY != '' }}
secrets: inherit
with:
deploy_latest: true
duckdb_version: v1.0.0
exclude_archs: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
extension_name: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME }}
repository: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_GITHUB }}
ref: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_REF }}
docs:
needs:
- deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up DuckDB
run: |
wget https://github.com/duckdb/duckdb/releases/download/v1.0.0/duckdb_cli-linux-amd64.zip
unzip duckdb_cli-linux-amd64.zip
chmod +x duckdb
- name: Generate docs
run: |
# TODO: fix this when upstream version is corrected
rm -r extensions/sqlite_scanner
./scripts/fetch_extensions.sh ./duckdb
./scripts/generate_md.sh ./duckdb
- uses: actions/upload-artifact@v3
with:
name: generated_markdowns
path: |
build/docs/*.md