Skip to content

Commit d47e96b

Browse files
fix workflow and cancel on beta release
1 parent e3998b2 commit d47e96b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/docs-on-release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,26 @@ jobs:
1212
environment: dev_environment
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Get Python 3.10
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
1519
- name: Checkout
1620
uses: actions/checkout@v4
1721
with:
1822
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
19-
- name: Set env
20-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+
- name: Get version set env, exit if beta release
24+
run: |
25+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26+
if [[ "$RELEASE_VERSION" == *"b"* ]]; then
27+
echo "Version is a beta release. Cancel workflow."
28+
exit 0
29+
fi
2130
- name: Install dependencies
2231
run: |
2332
sudo apt-get update;
24-
sudo apt-get install pandoc
33+
sudo apt-get install pandoc;
34+
pip install -e .
2535
- name: Build and Commit
2636
uses: sphinx-notes/pages@v2
2737
with:

0 commit comments

Comments
 (0)