From bb4ca29438d4cf2441107c9618587c18e794477f Mon Sep 17 00:00:00 2001 From: Jonathan Cheong Date: Fri, 17 Nov 2023 10:56:37 +1100 Subject: [PATCH] gitaction files --- .github/workflows/push-modio-docs.yml | 31 +++++++++++++++++++++++++++ Tools/create-docs.sh | 6 ++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/push-modio-docs.yml create mode 100755 Tools/create-docs.sh 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