diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2375204..a5f72d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,10 @@ jobs: run: uv run nox - name: Upload coverage reports to Codecov + if: >- + github.repository == 'Dependable-Intelligent-Systems-Lab/xwhy' && + (github.event_name != 'pull_request' || + github.event.pull_request.head.repo.full_name == 'Dependable-Intelligent-Systems-Lab/xwhy') uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4950f02..bd6ae00 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,13 +26,13 @@ on: concurrency: group: documentation-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: false permissions: - contents: write + contents: read jobs: - build-and-deploy: + build-docs: if: >- github.repository == 'Dependable-Intelligent-Systems-Lab/xwhy' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') @@ -88,11 +88,30 @@ jobs: grep -q "Release history" site/release-notes/index.html ! grep -q "index.md" site/llms.txt - - name: Deploy Validated Documentation + - name: Upload GitHub Pages artifact if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' - uses: peaceiris/actions-gh-pages@v4 + uses: actions/upload-pages-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages - publish_dir: ./site - force_orphan: true + path: ./site + + deploy: + # Repository Settings > Pages > Build and deployment > Source: GitHub Actions. + if: >- + github.repository == 'Dependable-Intelligent-Systems-Lab/xwhy' && + github.ref == 'refs/heads/main' && + github.event_name != 'pull_request' + needs: build-docs + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Deploy validated documentation + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pagespeed-audit.yml b/.github/workflows/pagespeed-audit.yml index f26db09..910847a 100644 --- a/.github/workflows/pagespeed-audit.yml +++ b/.github/workflows/pagespeed-audit.yml @@ -18,6 +18,9 @@ permissions: jobs: mobile-audit: + if: >- + github.repository == 'Dependable-Intelligent-Systems-Lab/xwhy' && + github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Wait for GitHub Pages propagation diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 85f413e..b0afba8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,7 @@ on: jobs: pypi-publish: name: Build, Publish, and Release + if: github.repository == 'Dependable-Intelligent-Systems-Lab/xwhy' runs-on: ubuntu-latest environment: @@ -44,4 +45,4 @@ jobs: uses: softprops/action-gh-release@v3 with: generate_release_notes: true - files: dist/* \ No newline at end of file + files: dist/*