diff --git a/.github/workflows/branch-deploy.yaml b/.github/workflows/branch-deploy.yaml index e1fd802df9..2e1cc5a6cc 100644 --- a/.github/workflows/branch-deploy.yaml +++ b/.github/workflows/branch-deploy.yaml @@ -9,6 +9,8 @@ on: - closed paths-ignore: - 'docs/**' + - '**/.github/workflows/**' + - '!.github/workflows/branch-deploy.yaml' concurrency: group: ${{ github.workflow }}-${{ github.event.number }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..66541c9748 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,44 @@ +name: Publish Documentation +on: + push: + branches: [ main, maintenance ] + paths: + - 'docs/**' + pull_request: + paths: + - 'docs/**' +jobs: + test: + runs-on: ubuntu-latest + name: Test Documentation links + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '18' + - name: Install Dependencies + run: npm ci + - name: Test Documentation Links + run: npm run test:docs + publish: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: test + name: Publish Documentation + steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.GH_BOT_APP_ID }} + private_key: ${{ secrets.GH_BOT_APP_KEY }} + + - name: Trigger website rebuild + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: build.yml + repo: flowfuse/website + ref: main + token: ${{ steps.generate_token.outputs.token }} diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml deleted file mode 100644 index 75fdc25990..0000000000 --- a/.github/workflows/test-docs.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Test Documentation Links -on: - push: - branches: [ main, maintenance ] - pull_request: -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '18' - # Install NPM dependencies - - name: Install Dependencies - run: npm ci - # Run Tests - - run: npm run test:docs