Merge branch 'main' of https://github.com/fhdsl/ottr into main #23
This file contains 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: Clean Docs Directory | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main, staging ] | |
jobs: | |
clean-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Delete all files inside docs | |
run: | | |
rm -rf docs/* | |
mkdir -p docs | |
- name: Commit changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add docs/ | |
git commit -m "Cleaned up docs directory" || echo "No changes to commit" | |
git push | |
- name: Trigger Next Workflow | |
run: | | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token ${{ secrets.GH_PAT }}" \ | |
https://api.github.com/repos/${{ github.repository }}/dispatches \ | |
-d '{"event_type": "docs-cleaned"}' |