Skip to content

Commit 21c6182

Browse files
committed
trigger help xfer only on change to help
1 parent 6f534c3 commit 21c6182

File tree

3 files changed

+40
-25
lines changed

3 files changed

+40
-25
lines changed

.github/workflows/builddocsite.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# create a documentation web site for GSAS-II from four sources
2-
# * HTML tutorials are simply copied
3-
# * markdown tutorials (in ./MDtutorials) are formatted with pandoc and are copied over
4-
# * sphinx is used to generate HTML from files in ./webdocs
5-
# * the tutorials.html file and the */data/index.html files are
6-
# created by running scripts/makeGitTutorial
7-
# * the help pages are created from the .md file in the MDhelp directory
8-
# * this triggers a process that also creates the help files and places
9-
# the .html files into the GSAS-II sources
2+
# 1. HTML tutorials are simply copied
3+
# 2. markdown tutorials (in ./MDtutorials) are formatted with pandoc and are copied over
4+
# * the tutorials.html file and the */data/index.html files are
5+
# created by running scripts/makeGitTutorial.py
6+
# 3. sphinx is used to generate HTML from files in ./webdocs
7+
# 4. the help pages are created from the .md file in the MDhelp directory
108

119
name: build GSAS-II web site w/MD Help
1210

@@ -26,21 +24,6 @@ jobs:
2624
build: # Build web pages
2725
runs-on: ubuntu-latest
2826
steps:
29-
30-
- name: Trigger remote workflow to update help files in GSAS-II repo
31-
# see below for info on setting this up
32-
run: |
33-
# config var follows
34-
repo_owner="AdvancedPhotonSource"
35-
36-
curl -L \
37-
-X POST \
38-
-H "Accept: application/vnd.github+json" \
39-
-H "Authorization: Bearer ${{ secrets.G2TUT_2_G2_4HELP }}" \
40-
-H "X-GitHub-Api-Version: 2022-11-28" \
41-
https://api.github.com/repos/$repo_owner/GSAS-II/dispatches \
42-
-d '{"event_type": "remote build", "client_payload": {"service": "remote build", "unit": false, "integration": true}}'
43-
4427
- name: Python setup
4528
uses: actions/setup-python@v3
4629
- name: Sphinx setup

.github/workflows/helpxfer.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# this triggers a process that will creates the help .HTML files and places
2+
# them into the GSAS-II sources
3+
4+
name: xfer MD Help to GSAS-II repo
5+
6+
on:
7+
workflow_dispatch: # nice for debugging
8+
9+
push:
10+
branches: [ "main" ]
11+
paths: # want this to run only when help contents changes
12+
- MDhelp
13+
14+
jobs:
15+
build: # Build web pages
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Trigger remote workflow to update help files in GSAS-II repo
19+
# see below for info on setting this up
20+
run: |
21+
# config var follows
22+
repo_owner="AdvancedPhotonSource"
23+
24+
curl -L \
25+
-X POST \
26+
-H "Accept: application/vnd.github+json" \
27+
-H "Authorization: Bearer ${{ secrets.G2TUT_2_G2_4HELP }}" \
28+
-H "X-GitHub-Api-Version: 2022-11-28" \
29+
https://api.github.com/repos/$repo_owner/GSAS-II/dispatches \
30+
-d '{"event_type": "remote build", "client_payload": {"service": "remote build", "unit": false, "integration": true}}'
31+

webdocs/documentation.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ works. The help information can also be viewed `as a PDF document
3333

3434
Note that the help documentation was recently reformatted and updated
3535
as MarkDown (simple text) input files found
36-
`in GitHub, here<https://github.com/AdvancedPhotonSource/GSAS-II-tutorials/tree/main/MDhelp>`_.
37-
Comments, corrections, additions and issue reports on Help are most welcome.
36+
in GitHub in the MDhelp directory of the
37+
AdvancedPhotonSource/GSAS-II-tutorials repo (https://github.com/AdvancedPhotonSource/GSAS-II-tutorials/tree/main/MDhelp).
38+
Comments, corrections, additions and issue reports on Help content are most welcome.
3839

3940
.. index:: Source code documentation
4041

0 commit comments

Comments
 (0)