Skip to content

Merge pull request #32 from homarr-labs/fix/sync-docs #9

Merge pull request #32 from homarr-labs/fix/sync-docs

Merge pull request #32 from homarr-labs/fix/sync-docs #9

Workflow file for this run

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
token: ${{ secrets.GITHUB_TOKEN }}
# 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
sed -i '1s/# Homarr/# Helm/' 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: Obtain token
id: obtainToken
uses: tibdex/github-app-token@v2
with:
private_key: ${{ secrets.HOMARR_DOCS_SYNC_APP_PRIVATE_KEY }}
app_id: ${{ vars.HOMARR_DOCS_SYNC_APP_ID }}
installation_retrieval_mode: repository
installation_retrieval_payload: homarr-labs/documentation
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
id: cpr
with:
token: ${{ steps.obtainToken.outputs.token }}
branch: docs/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
path: target-repo
body: |
This PR updates the documentation file to match the latest Helm chart changes.
labels: |
helm
docs
- name: Enable Pull Request Automerge
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}" --repo https://github.com/homarr-labs/documentation
env:
GH_TOKEN: ${{ steps.obtainToken.outputs.token }}