Skip to content

WIP: Adding versioned docs with search #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
91 changes: 91 additions & 0 deletions .github/workflows/sync-podman-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Sync Podman Documentation

on:
schedule:
# Run daily at 2 AM UTC to check for new releases
- cron: '0 2 * * *'

workflow_dispatch:
inputs:
force_sync:
description: 'Force sync even if no new releases'
required: false
default: false
type: boolean

permissions:
contents: write

jobs:
sync-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run documentation sync
run: |
chmod +x scripts/sync-podman-docs.js
node scripts/sync-podman-docs.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update version management
run: |
node scripts/sync-podman-docs.js sync-versions

- name: Check for changes
id: changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"

# Check if there are any changes
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
echo "Found changes in documentation"
else
echo "changes=false" >> $GITHUB_OUTPUT
echo "No changes detected"
fi

- name: Commit and push changes
if: steps.changes.outputs.changes == 'true' || github.event.inputs.force_sync == 'true'
run: |
git add .
git commit -m "chore: sync Podman documentation with latest releases

- Updated documentation from containers/podman repository
- Synced with latest stable releases
- Updated version management files

Auto-generated by sync-podman-docs workflow"

git push origin main

- name: Create summary
if: always()
run: |
echo "## Documentation Sync Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Triggered by**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Changes detected**: ${{ steps.changes.outputs.changes }}" >> $GITHUB_STEP_SUMMARY
echo "- **Force sync**: ${{ github.event.inputs.force_sync }}" >> $GITHUB_STEP_SUMMARY
echo "- **Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY

if [[ -f "versions.json" ]]; then
echo "### Current Versions" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
head -20 versions.json >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
75 changes: 0 additions & 75 deletions docs/checkpoint.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/documentation.md

This file was deleted.

Loading