GeezerVison is showing github.com — ci: only release on successfull ci · FBumann/xarray_plotly@afcc9b9
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +32Lines changed: 32 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
40 | 40 | with: |
41 | 41 | token: ${{ secrets.CODECOV_TOKEN }} |
42 | 42 | fail_ci_if_error: false |
| 43 | + |
| 44 | + docs: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v6 |
| 48 | + |
| 49 | + - name: Install uv |
| 50 | + uses: astral-sh/setup-uv@v7 |
| 51 | + |
| 52 | + - name: Install dependencies |
| 53 | + run: uv sync --extra docs |
| 54 | + |
| 55 | + - name: Build docs |
| 56 | + run: uv run mkdocs build |
| 57 | + |
| 58 | + ci-success: |
| 59 | + name: CI Success |
| 60 | + needs: [test, docs] |
| 61 | + if: always() |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - name: Check all jobs passed |
| 65 | + run: | |
| 66 | + if [[ "${{ needs.test.result }}" != "success" ]]; then |
| 67 | + echo "Test job failed or was cancelled" |
| 68 | + exit 1 |
| 69 | + fi |
| 70 | + if [[ "${{ needs.docs.result }}" != "success" ]]; then |
| 71 | + echo "Docs job failed or was cancelled" |
| 72 | + exit 1 |
| 73 | + fi |
| 74 | + echo "All CI checks passed!" |
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/docs.yml +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | name: Docs |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
| 4 | + pull_request: |
5 | 5 | branches: [main] |
6 | 6 | release: |
7 | 7 | types: [published] |
|
26 | 26 | run: uv run mkdocs build |
27 | 27 |
|
28 | 28 | - name: Deploy to GitHub Pages |
| 29 | + if: github.event_name == 'release' |
29 | 30 | uses: peaceiris/actions-gh-pages@v4 |
30 | 31 | with: |
31 | 32 | github_token: ${{ secrets.GITHUB_TOKEN }} |
|