Skip to content

Commit 5b2f0c1

Browse files
authored
Merge pull request #88 from projectpythia-mystmd/main
MySTify
2 parents e2f1f31 + 2f0f1fb commit 5b2f0c1

File tree

11 files changed

+106
-154
lines changed

11 files changed

+106
-154
lines changed

.github/workflows/nightly-build.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ name: nightly-build
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * *' # Daily “At 00:00”
7-
8-
env:
9-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
10-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
6+
- cron: "0 0 * * *" # Daily “At 00:00”
117

128
jobs:
139
build:
1410
if: ${{ github.repository_owner == 'ProjectPythia' }}
1511
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
16-
secrets:
17-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
18-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
12+
with:
13+
build_command: 'myst build --execute --html'
1914

20-
link-check:
21-
if: ${{ github.repository_owner == 'ProjectPythia' }}
22-
uses: ProjectPythia/cookbook-actions/.github/workflows/link-checker.yaml@main
15+
deploy:
16+
needs: build
17+
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
18+
19+
# We don't have a link-checker with MyST right now
20+
# link-check:
21+
# if: ${{ github.repository_owner == 'ProjectPythia' }}
22+
# uses: ProjectPythia/cookbook-actions/.github/workflows/link-checker.yaml@main

.github/workflows/publish-book.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@ on:
77
- main
88
workflow_dispatch:
99

10-
env:
11-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
12-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
13-
1410
jobs:
1511
build:
1612
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
17-
secrets:
18-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
19-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
13+
with:
14+
build_command: 'myst build --execute --html'
15+
2016

2117
deploy:
2218
needs: build
23-
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
24-
19+
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: replace-links
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Find and Replace Repository Name
15+
uses: jacobtomlinson/gha-find-replace@v3
16+
with:
17+
find: "ProjectPythia/cookbook-template"
18+
replace: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
19+
regex: false
20+
exclude: ".github/workflows/replace-links.yaml"
21+
22+
- name: Find and Replace Repository ID
23+
uses: jacobtomlinson/gha-find-replace@v3
24+
with:
25+
find: "475509405"
26+
replace: "${{ github.repository_id}}"
27+
regex: false
28+
exclude: ".github/workflows/replace-links.yaml"
29+
30+
- name: Push changes
31+
uses: stefanzweifel/git-auto-commit-action@v5

.github/workflows/trigger-book-build.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ name: trigger-book-build
22
on:
33
pull_request:
44

5-
# instead of calling build-book directly, we will create and upload an artifact containing the source (minus .github directory)
6-
75
jobs:
8-
get-code:
9-
uses: ProjectPythia/cookbook-actions/.github/workflows/get-code.yaml@main
6+
build:
7+
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
108
with:
11-
code_artifact_name: code-zip-${{ github.event.number }}
9+
build_command: 'myst build --execute --html'
10+
artifact_name: book-zip-${{ github.event.number }}
11+
base_url: '/${{ github.event.repository.name }}/_preview/${{ github.event.number }}'
12+
# Other input options are possible, see ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml

.github/workflows/trigger-delete-preview.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ on:
66

77
jobs:
88
delete:
9-
uses: ProjectPythia/cookbook-actions/.github/workflows/delete-preview.yaml@main
9+
uses: ProjectPythia/cookbook-actions/.github/workflows/delete-preview.yaml@main

.github/workflows/trigger-link-check.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/trigger-preview.yaml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,21 @@ on:
44
workflows:
55
- trigger-book-build
66
types:
7-
- requested
7+
- requested
88
- completed
9-
env:
10-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
11-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
12-
9+
1310
jobs:
1411
find-pull-request:
1512
uses: ProjectPythia/cookbook-actions/.github/workflows/find-pull-request.yaml@main
16-
17-
build-book-for-preview:
18-
needs: find-pull-request
19-
if: github.event.workflow_run.conclusion == 'success'
20-
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
21-
secrets:
22-
ARM_USERNAME: ${{ secrets.ARM_USERNAME }}
23-
ARM_PASSWORD: ${{ secrets.ARM_PASSWORD }}
24-
with:
25-
environment_name: cmip6-cookbook-dev
26-
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
27-
build_from_code_artifact: "true"
28-
code_artifact_name: code-zip-${{ needs.find-pull-request.outputs.number }}
29-
3013
deploy-preview:
31-
needs: [find-pull-request, build-book-for-preview]
14+
needs: find-pull-request
3215
if: github.event.workflow_run.conclusion == 'success'
3316
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
3417
with:
3518
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
36-
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
37-
is_preview: 'false' # it is a preview but deployed from main branch context
38-
19+
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
20+
is_preview: "true"
21+
3922
preview-comment:
4023
needs: find-pull-request
4124
uses: ProjectPythia/cookbook-actions/.github/workflows/preview-comment.yaml@main

_config.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

_toc.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies:
3131
- jupyterlab
3232
- jupyter_server
3333
- globus-compute-sdk
34+
- mystmd
3435
- ipywidgets
3536
- pip
3637
- sphinx-pythia-theme

0 commit comments

Comments
 (0)