diff --git a/.github/workflows/push-modio-docs.yml b/.github/workflows/push-modio-docs.yml new file mode 100644 index 0000000..04b785d --- /dev/null +++ b/.github/workflows/push-modio-docs.yml @@ -0,0 +1,31 @@ +name: Push docs into modio docs +on: + push: + branches: + - main + paths: + - "**.md" + workflow_dispatch: + +jobs: + push-docs-to-modio-docs: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v3 + + - name: Create docs structure + run: | + Tools/create-docs.sh + + - name: Push public unity docs into modio + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.DOCS_ACCESS_TOKEN }} + with: + source-directory: out/docs/public/unity + destination-github-username: "modio" + destination-repository-name: "modio-docs" + commit-message: "docs: updating public unity docs from modio-unity repo" + target-branch: main + target-directory: public/unity diff --git a/Tools/create-docs.sh b/Tools/create-docs.sh new file mode 100755 index 0000000..533dff0 --- /dev/null +++ b/Tools/create-docs.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Create the folder structure of the docs +mkdir -p out/docs/public/unity + +# Copy md docs +cp README.md out/docs/public/unity/getting-started.md