diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index afc2be6c1..bedb15f2c 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -15,12 +15,16 @@ # specific language governing permissions and limitations # under the License. -name: Documentation CI +name: Docs CI on: pull_request: paths: - 'website/**' + - '.github/workflows/ci-docs.yml' + +permissions: + contents: read concurrency: group: ci-docs-${{ github.event.pull_request.number || github.ref }} @@ -32,6 +36,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v7 + with: + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 4d317d896..fd48978fb 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -15,20 +15,35 @@ # specific language governing permissions and limitations # under the License. -name: Deploy Docusaurus to GitHub Pages +name: Docs Deploy on: push: branches: [ main ] + paths: + - 'website/**' + - '.asf.yaml' + - '.github/workflows/deploy-docs.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: deploy-docs + cancel-in-progress: false jobs: deploy: if: github.repository == 'apache/fesod' runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v7 with: fetch-depth: 0 + persist-credentials: false - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 with: @@ -38,6 +53,8 @@ jobs: - uses: actions/setup-node@v7 with: node-version: "24" + cache: pnpm + cache-dependency-path: website/pnpm-lock.yaml - name: Corepack working-directory: website diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 372ee65d6..66302c49c 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -15,12 +15,21 @@ # specific language governing permissions and limitations # under the License. -name: Preview Documentation +name: Docs Preview on: pull_request: paths: - 'website/**' + - '.github/workflows/preview-docs.yml' + +permissions: + contents: read + pull-requests: write + +concurrency: + group: preview-docs-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: deploy-preview: @@ -28,6 +37,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v7 + with: + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86