Skip to content

Commit 4ada603

Browse files
authored
Merge pull request #286 from ocefpaf/deploy_only_on_releases
Deploy only on releases
2 parents c707d16 + a0a8253 commit 4ada603

9 files changed

+54
-5
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
11
name: Build and Deploy docs
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58
push:
6-
branches: [main]
7-
workflow_dispatch:
9+
branches:
10+
- main
11+
release:
12+
types:
13+
- published
814

915
jobs:
1016
build-docs:
1117
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
1220

1321
steps:
1422
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
persist-credentials: false
1525

1626
- name: Set up Python
1727
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1828
with:
1929
python-version: "3.x"
2030

21-
2231
- name: Build documentation
2332
run: >
2433
set -e
2534
&& pip install jupyter-book
2635
&& jupyter-book build jupyterbook
2736
2837
- name: GitHub Pages action
29-
if: github.ref == 'refs/heads/main'
38+
if: success() && github.event_name == 'release'
3039
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3140
with:
3241
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs-linkchecker.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check linkrot
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58
push:
@@ -11,13 +14,15 @@ jobs:
1114

1215
steps:
1316
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: false
1420

1521
- name: Set up Python
1622
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1723
with:
1824
python-version: "3.x"
1925

20-
2126
- name: Linkcheck
2227
run: >
2328
set -e

.github/workflows/relock.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: relock
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
schedule:
58
- cron: '0 0 1 * *'

.github/workflows/test-env.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test Environment
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58

@@ -17,6 +20,9 @@ jobs:
1720

1821
steps:
1922
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
fetch-depth: 0
25+
persist-credentials: false
2026

2127
- name: Setup Micromamba
2228
uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb # v2.0.6

.github/workflows/test-install-instructions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test Install instructions Section
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58

.github/workflows/test_data_access_notebooks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test Data Access Notebook
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58

@@ -9,6 +12,9 @@ jobs:
912

1013
steps:
1114
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
with:
16+
fetch-depth: 0
17+
persist-credentials: false
1218

1319
- name: Setup Micromamba
1420
uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb # v2.0.6

.github/workflows/test_data_analysis_and_visualization_notebooks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test Data Analysis And Visualization Notebooks
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58

@@ -9,6 +12,9 @@ jobs:
912

1013
steps:
1114
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
with:
16+
fetch-depth: 0
17+
persist-credentials: false
1218

1319
- name: Setup Micromamba
1420
uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb # v2.0.6

.github/workflows/test_data_management_notebooks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test Data Management Notebooks
22

3+
# no permissions by default
4+
permissions: {}
5+
36
on:
47
pull_request:
58

@@ -9,6 +12,9 @@ jobs:
912

1013
steps:
1114
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15+
with:
16+
fetch-depth: 0
17+
persist-credentials: false
1218

1319
- name: Setup Micromamba
1420
uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb # v2.0.6

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ repos:
5454
hooks:
5555
- id: nb-strip-paths
5656

57+
- repo: https://github.com/woodruffw/zizmor-pre-commit
58+
rev: v1.12.1
59+
hooks:
60+
- id: zizmor
61+
5762
ci:
5863
autofix_commit_msg: |
5964
[pre-commit.ci] auto fixes from pre-commit.com hooks

0 commit comments

Comments
 (0)