From 2716f1be9aa75e78286aa244c230532559a3c2b2 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Wed, 21 Feb 2024 15:11:00 -0500 Subject: [PATCH] ci: add gitbook auto pr workflow --- .github/workflows/gitbook.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/gitbook.yaml diff --git a/.github/workflows/gitbook.yaml b/.github/workflows/gitbook.yaml new file mode 100644 index 0000000..1f661dc --- /dev/null +++ b/.github/workflows/gitbook.yaml @@ -0,0 +1,32 @@ +name: Gitbook Review +on: + push: + branches: + - gitbook + +permissions: + contents: read + +jobs: + create-pull-request: + env: + branch: gitbook + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Authenticate GitHub CLI + run: | + echo -e ${{ secrets.MY_GITHUB_TOKEN }} | gh auth login --with-token + + - name: Create Pull Request + run: | + gh pr create \ + --base 'trunk' \ + --head 'gitbook' \ + --reviewer 'xavierchanth' \ + --title 'docs(automated): Update docs from Gitbook' \ + --body 'Sync Gitbook docs branch to trunk' || \ + echo "Already created?";