diff --git a/.github/workflows/automatic-doc-checks.yml b/.github/workflows/automatic-doc-checks.yml index b7e76c762..531a2298d 100644 --- a/.github/workflows/automatic-doc-checks.yml +++ b/.github/workflows/automatic-doc-checks.yml @@ -1,13 +1,19 @@ name: Main Documentation Checks on: - - push - - pull_request - - workflow_dispatch + push: + branches: + - main + paths: + - "docs/**" + pull_request: + paths: + - "docs/**" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: true jobs: documentation-checks: diff --git a/.github/workflows/documentation-update.yaml b/.github/workflows/documentation-update.yaml deleted file mode 100644 index 7bcd0c55f..000000000 --- a/.github/workflows/documentation-update.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Wiki to repository update - -on: - push: - branches: - - main - paths: - - "doc/**" - gollum: - -jobs: - wiki-to-repo-doc : - name: Sync wiki to repository doc directory - runs-on: ubuntu-latest - if: github.event_name == 'gollum' - steps: - - name: Checkout source code - uses: actions/checkout@v4 - with: - path: repo - - name: Checkout wiki - uses: actions/checkout@v4 - with: - path: wiki - repository: ubuntu/adsys.wiki - - name: Sync wiki to repository documentation - run: | - set -eu - - DOC_DIR=doc - DIFF=$(diff -qr --exclude=.git repo/"${DOC_DIR}/" wiki/ || true) - [ "$DIFF" == "" ] && exit 0 - - rsync -avzr --delete --exclude='.git/' wiki/ repo/"${DOC_DIR}/" - cd repo/ || exit 1 - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Auto-update from wiki editing" - git push - - repo-doc-to-wiki: - name: Sync repository doc directory to wiki - if: github.event_name != 'gollum' - runs-on: ubuntu-latest - steps: - - name: Checkout source code - uses: actions/checkout@v4 - with: - path: repo - - name: Checkout wiki - uses: actions/checkout@v4 - with: - path: wiki - repository: ubuntu/adsys.wiki - - name: Sync repository documentation to wiki - run: | - set -eu - - DOC_DIR=doc - DIFF=$(diff -qr --exclude=.git repo/"${DOC_DIR}/" wiki/ || true) - [ "$DIFF" == "" ] && exit 0 - - rsync -avzr --delete --exclude='.git/' repo/"${DOC_DIR}/" wiki/ - cd wiki/ - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Auto-update WIKI from source code" - git push origin master