Skip to content

Nightly documentation updates #34

Nightly documentation updates

Nightly documentation updates #34

name: Nightly documentation updates
on:
schedule:
- cron: "0 4 * * *" # run every day
workflow_dispatch:
jobs:
UpdateStarCountAndCopyStableToArchive:
if: github.repository == 'duckdb/duckdb-web'
name: Copy stable to preview
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Update star count
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
STAR_COUNT=$(gh api repos/duckdb/duckdb | jq ".stargazers_count")
STAR_COUNT_FORMATTED=$(python3 -c 'import sys; print(f"{int(sys.argv[1]) / 1000:.1f}k", end="")' ${STAR_COUNT})
sed -i "s/^star_count:.*/star_count: '${STAR_COUNT_FORMATTED}'/" _config.yml
- name: Copy releases CSV
run: |
# make sure the duckdb-releases.csv file gets deployes
cp _data/past_releases.csv data/duckdb-releases.csv
- name: Run copy and update calendar
run: |
pip install -r requirements.txt --break-system-packages
python scripts/copy_stable_to_preview.py
python scripts/get_calendar.py
- name: Create PR
uses: peter-evans/[email protected]
with:
branch: update-preview-branch
commit-message: "Update star count, copy stable to preview"
title: "Automated PR: Nightly documentation update"
body: "This PR was created automatically by GitHub Actions."