Refactor nextra initialization to support both default and named expo… #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Merge Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PAT_TOKEN }} | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Run merge script | |
| run: | | |
| python scripts/merge-docs.py | |
| - name: Commit and push updated docs if there are changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| # Check if there are changes | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "Changes detected. Committing updated docs..." | |
| git add README.md public/ | |
| git commit -m "Update merged docs via GitHub Action" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |