From 112d81e0d1490af381114bfe84d2f3736ed0bd0b Mon Sep 17 00:00:00 2001 From: Stefano <80751983+StefanoStream@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:47:52 +0100 Subject: [PATCH] Create copy_stoplight_docs.yml Automate the process of copying Markdown files from main branch to stoplight_docs branch whenever a merge occurs --- .github/workflows/copy_stoplight_docs.yml | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/copy_stoplight_docs.yml diff --git a/.github/workflows/copy_stoplight_docs.yml b/.github/workflows/copy_stoplight_docs.yml new file mode 100644 index 0000000..f97effb --- /dev/null +++ b/.github/workflows/copy_stoplight_docs.yml @@ -0,0 +1,24 @@ +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: Copy Markdown Files + run: | + cp -r ./**/*.md stoplight_docs/ + - name: Commit Changes + run: | + git add . + git commit -m "Update Stoplight documentation" + git push origin stoplight_docs