From 3b72bee8b39b2266d3bb22cbc0b8f104438deb74 Mon Sep 17 00:00:00 2001 From: oussama Dahmaz Date: Tue, 31 Dec 2024 15:12:24 +0100 Subject: [PATCH] ci(docs): sync helm chart doc with Homarr documentation repo --- .github/workflows/sync-docs.yaml | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/sync-docs.yaml diff --git a/.github/workflows/sync-docs.yaml b/.github/workflows/sync-docs.yaml new file mode 100644 index 0000000..4274130 --- /dev/null +++ b/.github/workflows/sync-docs.yaml @@ -0,0 +1,50 @@ +name: Sync Helm Chart Docs to Homarr documentation Repo + +on: + push: + branches: + - dev + +jobs: + sync-docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout helm chart Repo + uses: actions/checkout@v4 + with: + sparse-checkout: | + charts/homarr/README.md + sparse-checkout-cone-mode: false + + - name: Checkout Homarr documentation Repo + uses: actions/checkout@v4 + with: + repository: homarr-labs/documentation + path: target-repo + # TODO: Change to the main branch on stable release + ref: docs/version-1.0 + + - name: Sync Documentation + run: | + cp charts/homarr/README.md target-repo/docs/getting-started/installation/helm.md + cd target-repo + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "docs(helm): Update Helm chart documentation" || echo "No changes to commit" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.REPO_ACCESS_TOKEN }} + branch: update-helm-docs + # TODO: Change to the main branch on stable release + base: docs/version-1.0 + title: Update Helm chart documentation + delete-branch: true + body: | + This PR updates the documentation file to match the latest Helm chart changes. + labels: | + helm + docs