|
1 |
| -# This workflow installs PyGMT dependencies, build documentation and run tests |
2 |
| -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 1 | +# This workflow installs PyGMT and run tests |
3 | 2 |
|
4 | 3 | name: Tests
|
5 | 4 |
|
@@ -123,76 +122,10 @@ jobs:
|
123 | 122 | name: artifact-${{ runner.os }}-${{ matrix.python-version }}
|
124 | 123 | path: tmp-test-dir-with-unique-name
|
125 | 124 |
|
126 |
| - # Build the documentation |
127 |
| - - name: Build the documentation |
128 |
| - shell: bash -l {0} |
129 |
| - run: make -C doc clean all |
130 |
| - |
131 | 125 | # Upload coverage to Codecov
|
132 | 126 | - name: Upload coverage to Codecov
|
133 | 127 |
|
134 | 128 | with:
|
135 | 129 | file: ./coverage.xml # optional
|
136 | 130 | env_vars: OS,PYTHON
|
137 | 131 | fail_ci_if_error: false
|
138 |
| - |
139 |
| - - name: Checkout the gh-pages branch |
140 |
| - uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b |
141 |
| - with: |
142 |
| - ref: gh-pages |
143 |
| - # Checkout to this folder instead of the current one |
144 |
| - path: deploy |
145 |
| - # Download the entire history |
146 |
| - fetch-depth: 0 |
147 |
| - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') |
148 |
| - |
149 |
| - - name: Push the built HTML to gh-pages |
150 |
| - run: | |
151 |
| - # Detect if this is a release or from the master branch |
152 |
| - if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then |
153 |
| - # Get the tag name without the "refs/tags/" part |
154 |
| - version="${GITHUB_REF#refs/*/}" |
155 |
| - else |
156 |
| - version=dev |
157 |
| - fi |
158 |
| - echo "Deploying version: $version" |
159 |
| - # Make the new commit message. Needs to happen before cd into deploy |
160 |
| - # to get the right commit hash. |
161 |
| - message="Deploy $version from $(git rev-parse --short HEAD)" |
162 |
| - cd deploy |
163 |
| - # Need to have this file so that Github doesn't try to run Jekyll |
164 |
| - touch .nojekyll |
165 |
| - # Delete all the files and replace with our new set |
166 |
| - echo -e "\nRemoving old files from previous builds of ${version}:" |
167 |
| - rm -rvf ${version} |
168 |
| - echo -e "\nCopying HTML files to ${version}:" |
169 |
| - cp -Rvf ../doc/_build/html/ ${version}/ |
170 |
| - # If this is a new release, update the link from /latest to it |
171 |
| - if [[ "${version}" != "dev" ]]; then |
172 |
| - echo -e "\nSetup link from ${version} to 'latest'." |
173 |
| - rm -f latest |
174 |
| - ln -sf ${version} latest |
175 |
| - fi |
176 |
| - # Stage the commit |
177 |
| - git add -A . |
178 |
| - echo -e "\nChanges to be applied:" |
179 |
| - git status |
180 |
| - # Configure git to be the GitHub Actions account |
181 |
| - git config user.email "github-actions[bot]@users.noreply.github.com" |
182 |
| - git config user.name "github-actions[bot]" |
183 |
| - # If this is a dev build and the last commit was from a dev build |
184 |
| - # (detect if "dev" was in the previous commit message), reuse the |
185 |
| - # same commit |
186 |
| - if [[ "${version}" == "dev" && `git log -1 --format='%s'` == *"dev"* ]]; then |
187 |
| - echo -e "\nAmending last commit:" |
188 |
| - git commit --amend --reset-author -m "$message" |
189 |
| - else |
190 |
| - echo -e "\nMaking a new commit:" |
191 |
| - git commit -m "$message" |
192 |
| - fi |
193 |
| - # Make the push quiet just in case there is anything that could leak |
194 |
| - # sensitive information. |
195 |
| - echo -e "\nPushing changes to gh-pages." |
196 |
| - git push -fq origin gh-pages 2>&1 >/dev/null |
197 |
| - echo -e "\nFinished uploading generated files." |
198 |
| - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') |
0 commit comments