Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 9 additions & 36 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/volume=80gb"
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ steps.deployment.outputs['page-url'] }}
steps:
- name: Checkout
uses: actions/checkout@v7
Expand Down Expand Up @@ -101,43 +101,16 @@ jobs:
shell: bash -l {0}
run: |
jb build lectures --path-output ./ -n -W --keep-going
# Create HTML archive for release assets
- name: Create HTML archive
shell: bash -l {0}
run: |
tar -czf lecture-python-programming-html-${{ github.ref_name }}.tar.gz -C _build/html .
sha256sum lecture-python-programming-html-${{ github.ref_name }}.tar.gz > html-checksum.txt

# Create metadata manifest
cat > html-manifest.json << EOF
{
"tag": "${{ github.ref_name }}",
"commit": "${{ github.sha }}",
"timestamp": "$(date -Iseconds)",
"size_mb": $(du -sm _build/html | cut -f1),
"file_count": $(find _build/html -type f | wc -l)
}
EOF
- name: Upload archives to release
uses: softprops/action-gh-release@v3
with:
files: |
lecture-python-programming-html-${{ github.ref_name }}.tar.gz
html-checksum.txt
html-manifest.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add CNAME for custom domain
run: echo "python-programming.quantecon.org" > _build/html/CNAME
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: _build/html/
# Deploy to GitHub Pages + publish release assets (html archive, checksum, manifest)
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
uses: quantecon/actions/publish-gh-pages@v0.8.0
with:
build-dir: _build/html
cname: python-programming.quantecon.org
create-release-assets: 'true'
asset-name: 'lecture-python-programming-html'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare lecture-python-programming.notebooks sync
shell: bash -l {0}
run: |
Expand Down
Loading