Skip to content

Commit 2b1cfbd

Browse files
committed
Delete the documentation building part from Tests workflow
1 parent 2872225 commit 2b1cfbd

File tree

1 file changed

+1
-68
lines changed

1 file changed

+1
-68
lines changed

.github/workflows/ci_tests.yaml

+1-68
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
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
32

43
name: Tests
54

@@ -123,76 +122,10 @@ jobs:
123122
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
124123
path: tmp-test-dir-with-unique-name
125124

126-
# Build the documentation
127-
- name: Build the documentation
128-
shell: bash -l {0}
129-
run: make -C doc clean all
130-
131125
# Upload coverage to Codecov
132126
- name: Upload coverage to Codecov
133127
uses: codecov/[email protected]
134128
with:
135129
file: ./coverage.xml # optional
136130
env_vars: OS,PYTHON
137131
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

Comments
 (0)