diff --git a/docs/github-workflow.md b/docs/github-workflow.md index 5e26b3f..93426dc 100644 --- a/docs/github-workflow.md +++ b/docs/github-workflow.md @@ -32,6 +32,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -94,6 +96,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -102,11 +106,11 @@ jobs: python-version: "3.12" - name: Install mdcms - run: pip install mdcms + run: pip install git+https://github.com/kbenestad/mdcms.git - name: Build all sections run: | - for section in [DIRECTORY1] [DIRECTORY2] [DIRECTORY3] [DIRECTORY4]; do + for section in docs legal learning reception sysadmin; do cd $section mdcms build cd .. @@ -116,15 +120,12 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add docs/nav.yml docs/search.json legal/nav.yml legal/search.json learning/nav.yml learning/search.json sysadmin/nav.yml sysadmin/search.json + for section in docs legal learning reception sysadmin; do + git add $section/nav.yml $section/search.json + done git diff --staged --quiet || git commit -m "Build: update nav.yml and search.json" git push ``` -**IMPORTANT:** Please take note of the `run` part, where each directory is listed: -```bash -for section in [DIRECTORY1] [DIRECTORY2] [DIRECTORY3] [DIRECTORY4]; do -``` - -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! \ No newline at end of file +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!