@@ -33,35 +33,30 @@ jobs:
3333 path : dist/*.whl
3434 retention-days : 90
3535
36- - name : Display artifact URL
37- run : |
38- echo "Artifact URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts"
39- echo "Download URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/ocp_vscode-wheel"
40-
41- deploy_to_github_pages :
42- needs : build
43- runs-on : ubuntu-latest
44- steps :
45- - name : Checkout gh-pages branch
46- uses : actions/checkout@v4
47- with :
48- ref : gh-pages
49-
50- - name : Download wheel artifact
51- uses : actions/download-artifact@v4
52- with :
53- name : ocp_vscode-wheel
54- path : .
55-
56- - name : Extract wheel
57- run : |
58- unzip ocp_vscode-wheel.zip
59- mv dist/*.whl .
60-
61- - name : Deploy to GitHub Pages
36+ - name : Deploy wheel to GitHub Pages
6237 run : |
38+ # Create gh-pages branch if it doesn't exist
39+ git checkout --orphan gh-pages || git checkout gh-pages
40+
41+ # Clear the branch (keep only the wheel)
42+ git rm -rf . || true
43+ git clean -fxd
44+
45+ # Copy the wheel file
46+ cp dist/*.whl .
47+
48+ # Commit and push
49+ git add *.whl
6350 git config user.name "github-actions[bot]"
6451 git config user.email "github-actions[bot]@users.noreply.github.com"
65- git add -v .
6652 git commit -m "Update wheel" || echo "No changes to commit"
67- git push origin gh-pages
53+ git push origin gh-pages --force
54+
55+ - name : Display GitHub Pages URL
56+ run : |
57+ WHEEL_NAME=$(ls dist/*.whl | head -1 | xargs basename)
58+ echo "Wheel deployed to GitHub Pages:"
59+ echo "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/$WHEEL_NAME"
60+ echo ""
61+ echo "Use this URL in Pyodide:"
62+ echo "await micropip.install('https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/$WHEEL_NAME')"
0 commit comments