From bda4a16c3de4455fd2a3b3e446f047b1b8f91099 Mon Sep 17 00:00:00 2001 From: Sacha Roussakis-Notter Date: Sun, 4 Feb 2024 10:07:16 +1000 Subject: [PATCH] added workflow to sync, docs from repository as source of truth --- .github/workflows/sync-vaultify-docs.yml | 20 +++++++------------- README.md | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sync-vaultify-docs.yml b/.github/workflows/sync-vaultify-docs.yml index d83192c..fa58c1b 100644 --- a/.github/workflows/sync-vaultify-docs.yml +++ b/.github/workflows/sync-vaultify-docs.yml @@ -4,6 +4,10 @@ on: push: branches: - main + paths: + - '**/*.md' # Run workflow for any markdown file changes in the repo + - 'LICENSE' # Run workflow for changes to the LICENSE file in the root + - 'docs/cli/**' # Run workflow for any changes in the /docs/cli directory jobs: sync: @@ -54,16 +58,6 @@ jobs: rm -rf docs/cli/* || { echo "Failed to clear docs/cli directory"; exit 1; } cp -R ../docs/cli/* docs/cli/ || { echo "Failed to copy cli directory"; exit 1; } - git add -A - - if ! git diff --staged --quiet; then - echo "Changes detected. Committing and pushing..." - git commit -m "Synced from GitHub" - if ! git push; then - echo "Failed to push changes to Azure DevOps. Exiting." - exit 1 - fi - else - echo "No changes to sync" - fi - + git add . + git commit -m "Synced from GitHub" + git push origin main diff --git a/README.md b/README.md index ab89945..945f1d9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ In summary, `Vaultify` empowers you to optimize your Terraform state management, ### Get Started -Please refer to [Vaultify](https://vaultify.buungroup.com) for documentation. +Please refer to [Vaultify](https://vaultify.buungroup.com) for documentation.. Before using `Vaultify`, make sure your system meets the following requirements: