docs: added select type docs #13
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: Sync Docs to Docs Repo | |
on: | |
push: | |
paths: | |
- 'docs/**' | |
jobs: | |
sync-docs: | |
runs-on: ubuntu-latest | |
if: "${{ github.event.head_commit.message != 'docs: sync docs' }}" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Sync docs directory | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "MarvinJWendt" | |
# Clone using the GH_PAT for authentication | |
git clone https://x-access-token:${GH_PAT}@github.com/gttp-cli/docs.git temp_docs | |
rsync -av --delete docs/ temp_docs/docs/ | |
cd temp_docs | |
git add . | |
git commit -m "docs: sync docs" | |
# Ensure the URL uses the GH_PAT for authentication for future operations | |
git remote set-url origin https://x-access-token:${GH_PAT}@github.com/gttp-cli/docs.git | |
git push origin main |