diff --git a/docs/github-workflow.md b/docs/github-workflow.md index 93426dc..fe87ea7 100644 --- a/docs/github-workflow.md +++ b/docs/github-workflow.md @@ -56,7 +56,7 @@ jobs: git push ``` -If your MD-CMS instance is served from a directory within the repository (e.g., `docs`), you need to adjust the following paths accordingly: +If your MD-CMS instance is served from a directory within the repository (e.g., `docs`), you need to adjust `paths` and `git add` accordingly: ```bash paths: @@ -65,12 +65,18 @@ If your MD-CMS instance is served from a directory within the repository (e.g., - "[PATH TO SITE]/config.yml" ``` +and + +```bash + git add [PATH TO SITE]/nav.yml [PATH TO SITE]/search.json +``` + ## Enable workflow on multisites If you serve multiple MD-CMS instances from the same repository, you need to use a customised version of the script. Create `.github/workflows/build.yml` in your repository. -Review the script below. It has been set up with four different directories (`DIRECTORY`, `DIRECTORY2`, `DIRECTORY3`, and `DIRECTORY4`). Change the paths to your own directories: +Review the script below. It has been set up with four different directories (`DIRECTORY`, `DIRECTORY2`, `DIRECTORY3`, and `DIRECTORY4`). Change `paths` and `for section in` to your own directories: ```bash name: Build @@ -120,7 +126,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - for section in docs legal learning reception sysadmin; do + for section in [DIRECTORY2] [DIRECTORY2] [DIRECTORY3] [DIRECTORY4]; do git add $section/nav.yml $section/search.json done git diff --staged --quiet || git commit -m "Build: update nav.yml and search.json" @@ -128,4 +134,5 @@ jobs: ``` + This is different from the single site workflow. If you move from single site to multisite you need to updated the entire script -- it is not sufficient to just list the paths!