@@ -130,71 +130,3 @@ jobs:
130130 foreach($tutorial in $files) {
131131 hatch run jupyter execute "$tutorial"
132132 }
133-
134- publish :
135- name : Publish to PyPI
136- if : startsWith(github.ref, 'refs/tags/v')
137- needs : test_qek
138- runs-on : ubuntu-latest
139- permissions :
140- # IMPORTANT: this permission is mandatory for trusted publishing
141- id-token : write
142- steps :
143- - name : Check out QEK
144- uses : actions/checkout@v4
145- with :
146- ref : ${{ github.ref }}
147- - name : Set up Python
148- uses : actions/setup-python@v5
149- with :
150- python-version : " 3.10"
151- - name : Install Python dependencies
152- run : |
153- python -m pip install --upgrade pip
154- pip install hatch
155- - name : Build and publish package
156- run : |
157- hatch build
158- - name : Publish to PyPI
159- uses : pypa/gh-action-pypi-publish@release/v1
160- - name : Confirm deployment
161- timeout-minutes : 5
162- run : |
163- VERSION=${GITHUB_REF#refs/tags/v}
164- until pip download quantum-evolution-kernel==$VERSION
165- do
166- echo "Failed to download from PyPI, will wait for upload and retry."
167- sleep 1
168- done
169-
170- deploy_docs :
171- name : Deploy QEK docs (ubuntu)
172- if : startsWith(github.ref, 'refs/tags/v')
173- needs : test_qek
174- runs-on : ubuntu-latest
175- steps :
176- - name : Checkout QEK
177- uses : actions/checkout@v4
178- - name : Install JetBrains Mono font
179- run : |
180- sudo apt install -y wget unzip fontconfig
181- wget https://download.jetbrains.com/fonts/JetBrainsMono-2.304.zip
182- unzip JetBrainsMono-2.304.zip -d JetBrainsMono
183- mkdir -p /usr/share/fonts/truetype/jetbrains
184- cp JetBrainsMono/fonts/ttf/*.ttf /usr/share/fonts/truetype/jetbrains/
185- fc-cache -f -v
186- - name : Install graphviz
187- run : sudo apt-get install -y graphviz
188- - name : Set up Python 3.10
189- uses : actions/setup-python@v5
190- with :
191- python-version : ' 3.10'
192- - name : Install Hatch
193- run : |
194- pip install hatch
195- - name : Deploy docs
196- run : |
197- git config user.name "GitHub Actions"
198- git config user.email "actions@github.com"
199- git fetch origin gh-pages
200- hatch -v run docs:mike deploy --push --update-aliases ${{ github.ref_name }} latest
0 commit comments