Skip to content

Commit 3708d0d

Browse files
committed
enable test_pypi release
1 parent ef6fb5f commit 3708d0d

1 file changed

Lines changed: 40 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
types: [opened, reopened, synchronize, ready_for_review]
1717

1818
jobs:
19-
2019
lint:
2120
# run general checks that do not require installing the package
2221
runs-on: ubuntu-latest
@@ -74,8 +73,8 @@ jobs:
7473
strategy:
7574
fail-fast: true
7675
matrix:
77-
os: [ "ubuntu-latest" ]
78-
python-version: [ "3.8", "3.9", "3.10" ]
76+
os: ["ubuntu-latest"]
77+
python-version: ["3.8", "3.9", "3.10"]
7978
runs-on: ${{ matrix.os }}
8079

8180
steps:
@@ -101,52 +100,52 @@ jobs:
101100
contents: write
102101

103102
steps:
104-
- uses: actions/checkout@v3
105-
- name: Install poetry
106-
run: pipx install poetry
107-
- uses: actions/setup-python@v4
108-
with:
109-
python-version: "3.10"
110-
cache: "poetry"
111-
112-
- name: Install project with mkdocs and plugins
113-
run: poetry install --with docs
114-
115-
- name: Configure Git user (Github Actions Bot)
116-
run: |
117-
git config --local user.name "github-actions[bot]"
118-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
119-
120-
- name: Check out or initialize gh-pages branch
121-
run: |
122-
if git fetch origin gh-pages:gh-pages
123-
then
124-
echo "Found existing gh-pages branch."
125-
else
126-
echo "Creating new gh-pages branch and initializing mike."
127-
poetry run mike deploy -u ${{ github.ref_name }} latest
128-
poetry run mike set-default latest
129-
fi
130-
131-
- name: Build and deploy documentation to gh-pages
132-
run: |
133-
SET_LATEST=""
134-
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+*$ ]]; then
135-
# if a new release tag is pushed, mark the built documentation as 'latest'
136-
SET_LATEST="latest"
137-
fi
138-
poetry run mike deploy -u --push ${{ github.ref_name }} $SET_LATEST
103+
- uses: actions/checkout@v3
104+
- name: Install poetry
105+
run: pipx install poetry
106+
- uses: actions/setup-python@v4
107+
with:
108+
python-version: "3.10"
109+
cache: "poetry"
110+
111+
- name: Install project with mkdocs and plugins
112+
run: poetry install --with docs
113+
114+
- name: Configure Git user (Github Actions Bot)
115+
run: |
116+
git config --local user.name "github-actions[bot]"
117+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
118+
119+
- name: Check out or initialize gh-pages branch
120+
run: |
121+
if git fetch origin gh-pages:gh-pages
122+
then
123+
echo "Found existing gh-pages branch."
124+
else
125+
echo "Creating new gh-pages branch and initializing mike."
126+
poetry run mike deploy -u ${{ github.ref_name }} latest
127+
poetry run mike set-default latest
128+
fi
129+
130+
- name: Build and deploy documentation to gh-pages
131+
run: |
132+
SET_LATEST=""
133+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+*$ ]]; then
134+
# if a new release tag is pushed, mark the built documentation as 'latest'
135+
SET_LATEST="latest"
136+
fi
137+
poetry run mike deploy -u --push ${{ github.ref_name }} $SET_LATEST
139138
140139
publish:
141140
# if a version tag is pushed + tests + docs completed -> do release
142141
needs: docs
143142
if: startswith(github.ref, 'refs/tags/v')
144143
permissions:
145-
contents: write # for GitHub release
146-
id-token: write # for PyPI release
144+
contents: write # for GitHub release
145+
id-token: write # for PyPI release
147146

148147
uses: "./.github/workflows/release.yml"
149148
with:
150149
to_github: true
151-
to_test_pypi: false
150+
to_test_pypi: true
152151
to_pypi: false

0 commit comments

Comments
 (0)