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
26 changes: 22 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,25 @@ on:
push:
tags:
- 'publish*'

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write # write: upload release assets (html archive, checksum, manifest)
pages: write
id-token: write # required for OIDC-based Pages deployment

# Allow only one concurrent deployment; don't cancel an in-flight deploy
concurrency:
group: "pages"
cancel-in-progress: false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmcky these take a while to deploy, so if there are concurrent deployments it might make sense to cancel the in-flight and proceed with the next one?


jobs:
publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs['page-url'] }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -65,12 +80,15 @@ jobs:
with:
name: execution-reports
path: _build/html/reports
- name: Deploy website to gh-pages
uses: peaceiris/actions-gh-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: quantecon/actions/publish-gh-pages@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html/
build-dir: _build/html
cname: datascience.quantecon.org
create-release-assets: 'true'
asset-name: 'lecture-datascience-html'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload "_build" folder (cache)
uses: actions/upload-artifact@v4
with:
Expand Down
Loading