Skip to content

Github action for building and publishing MyST content using Curvenote

License

Notifications You must be signed in to change notification settings

curvenote/action-myst-publish

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MyST Publish Github Action

This action enables publishing MyST content to a Curvenote site. A Curvenote account is required, and you must set your Curvenote API token as a github repository secret named CURVENOTE_TOKEN.

You also need a myst.yml file with your site configuration:

myst: v1
...
site:
  template: book-theme
  projects:
    - slug: myst
      path: .
  domains:
    - username-myst_project.curve.space

Example: Deploy on push to main:

name: deploy-myst-site
on:
  push:
    branches:
      - main
permissions:
  contents: read
  pull-requests: write
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy 🚀
        uses: curvenote/action-myst-publish
        env:
          CURVENOTE_TOKEN: ${{ secrets.CURVENOTE_TOKEN }}

Example: Deploy preview on PR:

name: deploy-myst-site-preview
on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - closed
permissions:
  contents: read
  pull-requests: write
jobs:
  build-and-deploy-preview:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy 🚀
        uses: curvenote/action-myst-publish
        env:
          CURVENOTE_TOKEN: ${{ secrets.CURVENOTE_TOKEN }}
        with:
          preview: true
          preview_subdomain: username-myst_preview

The preview_subdomain must be prefixed with your Curvenote username followed by a hyphen; the rest of the subdomain may have letters, numbers, or underscores. Preview domains will be automatically suffixed with pull request number.

About

Github action for building and publishing MyST content using Curvenote

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages