Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 14 additions & 6 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ jobs:
permissions:
issues: write # required for QuantEcon link-checker
steps:
# Checkout the live site (html)
- name: Checkout
uses: actions/checkout@v6
with:
ref: gh-pages
# Download the latest release HTML archive (permanent, not subject to artifact expiry)
- name: Get latest release asset URL
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
ASSET_URL=$(gh api repos/${{ github.repository }}/releases/latest \
--jq '.assets[] | select(.name | endswith(".tar.gz")) | .browser_download_url')
echo "asset-url=$ASSET_URL" >> $GITHUB_OUTPUT
- name: Download and extract release HTML
run: |
mkdir -p _site
curl -sL "${{ steps.release.outputs.asset-url }}" | tar -xz -C _site
- name: AI-Powered Link Checker
uses: QuantEcon/action-link-checker@main
with:
html-path: '.' # gh-pages live html
html-path: '_site'
fail-on-broken: 'false'
silent-codes: '403,503'
ai-suggestions: 'true'
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@ on:
push:
tags:
- 'publish*'

permissions:
contents: write
actions: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large"
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -113,12 +127,17 @@ jobs:
html-manifest.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy website to gh-pages
uses: peaceiris/actions-gh-pages@v4
- name: Add CNAME for custom domain
run: echo "python-programming.quantecon.org" > _build/html/CNAME
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html/
cname: python-programming.quantecon.org
path: _build/html/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Prepare lecture-python-programming.notebooks sync
shell: bash -l {0}
run: |
Expand Down
Loading