Update copy_stoplight_docs.yml #7
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: Copy Markdown to Stoplight Branch | |
on: | |
push: | |
branches: [main] | |
jobs: | |
copy-markdown: | |
name: Deploy Stoplight documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check for Stoplight Branch | |
run: | | |
git checkout -b stoplight_docs --force | |
git push origin stoplight_docs --force | |
- name: Removing all files except Markdown Files | |
run: | | |
find . -mindepth 1 -type f \( -not -name "*.md" -and -not -name ".gitignore" \) -delete -o -type d \( -not -name ".git" -and -not -name ".github" \) -exec rm -rf {} + | |
- name: Commit Changes | |
run: | | |
git add . | |
git commit -m "Update Stoplight documentation" | |
git push origin stoplight_docs |