@@ -65,17 +65,21 @@ jobs:
65
65
with :
66
66
python-version : ' 3.9'
67
67
68
+ - name : configure git
69
+ uses : cylc/release-actions/configure-git@v1
70
+
68
71
- name : checkout cylc-doc
69
72
uses : actions/checkout@v3
70
73
with :
71
- ref : ${{ github.event. inputs.cylc-flow-tag }}
74
+ ref : ${{ inputs.cylc-flow-tag }}
72
75
path : docs
73
76
74
77
- name : install dependencies
75
78
uses : cylc/cylc-doc/.github/actions/install-dependencies@master
76
79
77
80
- name : install cylc-doc
78
- run : pip install "${{ github.workspace }}/docs[all]"
81
+ working-directory : docs
82
+ run : pip install ".[all]"
79
83
80
84
- name : install libs to document
81
85
uses : cylc/cylc-doc/.github/actions/install-libs@master
@@ -94,21 +98,18 @@ jobs:
94
98
path : gh-pages
95
99
96
100
- name : sync static files
97
- if : ${{ github.event.inputs.set_stable == 'true' }}
101
+ if : ${{ inputs.set_stable }}
102
+ env :
103
+ DOCS : ' ${{ github.workspace }}/docs'
104
+ PAGE : ' ${{ github.workspace }}/gh-pages'
98
105
run : |
99
- DOCS="${{ github.workspace }}/docs" \
100
- PAGE="${{ github.workspace }}/gh-pages" \
101
-
102
106
rsync -r "$DOCS/doc/" "$PAGE/"
103
107
104
108
- name : install gh-pages
109
+ working-directory : docs
105
110
run : |
106
- DOCS="${{ github.workspace }}/docs" \
107
- PAGE="${{ github.workspace }}/gh-pages" \
108
-
109
- cd "$DOCS"
110
111
rm -r doc
111
- ln -s "$PAGE" doc
112
+ ln -s ../gh-pages doc
112
113
113
114
- name : build docs
114
115
run : |
@@ -120,20 +121,17 @@ jobs:
120
121
slides \
121
122
linkcheck \
122
123
SPHINXOPTS='-Wn' \
123
- STABLE=${{ github.event.inputs.set_stable }} \
124
- LATEST=${{ github.event.inputs.set_latest }}
125
-
126
- - name : configure git
127
- uses : cylc/release-actions/configure-git@v1
124
+ STABLE=${{ inputs.set_stable }} \
125
+ LATEST=${{ inputs.set_latest }}
128
126
129
127
- name : tidy old versions
128
+ working-directory : docs
130
129
run : |
131
- cd docs
132
- git rm -r $("${{ github.workspace }}/docs/bin/version" tidy) || true
130
+ git rm -r $("./bin/version" tidy) || true
133
131
134
132
- name : push changes
133
+ working-directory : gh-pages
135
134
run : |
136
- cd gh-pages
137
135
git add *
138
- git commit -m "add: ${{ github.event. inputs.cylc-flow-tag }}"
136
+ git commit -m "add: ${{ inputs.cylc-flow-tag }}"
139
137
git push origin HEAD
0 commit comments