deps: upgrade hugo and docsy #2
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: Sync issue templates to content directory | |
| on: | |
| push: | |
| paths: | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - 'content/en/issue_templates/**' | |
| workflow_dispatch: # allow manual triggering | |
| env: | |
| TEMPLATES_CONTENT_DIR: 'content/en/issue_templates' | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Setup actions bot user | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Create target directory if it doesn't exist | |
| run: mkdir -p "${{ env.TEMPLATES_CONTENT_DIR }}" | |
| - name: Sync Issue Templates | |
| run: | | |
| rsync -av --delete --exclude 'index.md' .github/ISSUE_TEMPLATE/ "${{ env.TEMPLATES_CONTENT_DIR }}/" | |
| if [[ -n $(git status --porcelain) ]]; then | |
| git add "${{ env.TEMPLATES_CONTENT_DIR }}" | |
| git commit -m "chore: sync issue templates" | |
| git push | |
| else | |
| echo "No changes to commit, templates are already in sync." | |
| fi |