Skip to content

Commit

Permalink
gitaction files
Browse files Browse the repository at this point in the history
  • Loading branch information
DoingItNow committed Nov 16, 2023
1 parent 01ce28d commit bb4ca29
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/push-modio-docs.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions Tools/create-docs.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bb4ca29

Please sign in to comment.