-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows including MyST NB and precommit added
- Loading branch information
Showing
10 changed files
with
554 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,32 @@ | ||
# This file was created automatically with `myst init --gh-pages` 🪄 💚 | ||
|
||
name: MyST GitHub Pages Deploy | ||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
# Runs on pushes targeting the default branch | ||
branches: [main] | ||
env: | ||
# `BASE_URL` determines the website is served from, including CSS & JS assets | ||
# You may need to change this to `BASE_URL: ''` | ||
BASE_URL: /${{ github.event.repository.name }} | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
path: ./_build/html | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
if: >- | ||
github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
- name: Install MyST Markdown | ||
run: npm install -g mystmd | ||
- name: Build HTML Assets | ||
run: myst build --html | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "./_build/html" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.ipynb_checkpoints | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# outline for a myst_nb project with sphinx | ||
# build with: sphinx-build -nW --keep-going -b html . ./_build/html | ||
|
||
# load extensions | ||
extensions = ["myst_nb"] | ||
|
||
# specify project details | ||
master_doc = "index" | ||
project = "GlueX N-Star" | ||
|
||
# basic build settings | ||
exclude_patterns = [".pixi", "_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] | ||
nitpicky = True | ||
|
||
## myst_nb default settings | ||
|
||
# Custom formats for reading notebook; suffix -> reader | ||
# nb_custom_formats = {} | ||
|
||
# Notebook level metadata key for config overrides | ||
# nb_metadata_key = 'mystnb' | ||
|
||
# Cell level metadata key for config overrides | ||
# nb_cell_metadata_key = 'mystnb' | ||
|
||
# Mapping of kernel name regex to replacement kernel name(applied before execution) | ||
# nb_kernel_rgx_aliases = {} | ||
|
||
# Regex that matches permitted values of eval expressions | ||
# nb_eval_name_regex = '^[a-zA-Z_][a-zA-Z0-9_]*$' | ||
|
||
# Execution mode for notebooks | ||
# nb_execution_mode = 'auto' | ||
|
||
# Path to folder for caching notebooks (default: <outdir>) | ||
# nb_execution_cache_path = '' | ||
|
||
# Exclude (POSIX) glob patterns for notebooks | ||
# nb_execution_excludepatterns = () | ||
|
||
# Execution timeout (seconds) | ||
# nb_execution_timeout = 30 | ||
|
||
# Use temporary folder for the execution current working directory | ||
# nb_execution_in_temp = False | ||
|
||
# Allow errors during execution | ||
# nb_execution_allow_errors = False | ||
|
||
# Raise an exception on failed execution, rather than emitting a warning | ||
# nb_execution_raise_on_error = False | ||
|
||
# Print traceback to stderr on execution error | ||
# nb_execution_show_tb = False | ||
|
||
# Merge stdout/stderr execution output streams | ||
# nb_merge_streams = False | ||
|
||
# The entry point for the execution output render class (in group `myst_nb.output_renderer`) | ||
# nb_render_plugin = 'default' | ||
|
||
# Remove code cell source | ||
# nb_remove_code_source = False | ||
|
||
# Remove code cell outputs | ||
# nb_remove_code_outputs = False | ||
|
||
# Prompt to expand hidden code cell {content|source|outputs} | ||
# nb_code_prompt_show = 'Show code cell {type}' | ||
|
||
# Prompt to collapse hidden code cell {content|source|outputs} | ||
# nb_code_prompt_hide = 'Hide code cell {type}' | ||
|
||
# Number code cell source lines | ||
# nb_number_source_lines = False | ||
|
||
# Overrides for the base render priority of mime types: list of (builder name, mime type, priority) | ||
# nb_mime_priority_overrides = () | ||
|
||
# Behaviour for stderr output | ||
# nb_output_stderr = 'show' | ||
|
||
# Pygments lexer applied to stdout/stderr and text/plain outputs | ||
# nb_render_text_lexer = 'myst-ansi' | ||
|
||
# Pygments lexer applied to error/traceback outputs | ||
# nb_render_error_lexer = 'ipythontb' | ||
|
||
# Options for image outputs (class|alt|height|width|scale|align) | ||
# nb_render_image_options = {} | ||
|
||
# Options for figure outputs (classes|name|caption|caption_before) | ||
# nb_render_figure_options = {} | ||
|
||
# The format to use for text/markdown rendering | ||
# nb_render_markdown_format = 'commonmark' | ||
|
||
# Javascript to be loaded on pages containing ipywidgets | ||
# nb_ipywidgets_js = {'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js': {'integrity': 'sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=', 'crossorigin': 'anonymous'}, 'https://cdn.jsdelivr.net/npm/@jupyter-widgets/[email protected]/dist/embed-amd.js': {'data-jupyter-widgets-cdn': 'https://cdn.jsdelivr.net/npm/', 'crossorigin': 'anonymous'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# MyST-NB Quickstart | ||
|
||
```{toctree} | ||
Hello | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "0a91cd30", | ||
"metadata": {}, | ||
"source": [ | ||
"# Jupyter Notebook" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "d9736bba", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"print('Hello, World!')" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
file_format: mystnb | ||
kernelspec: | ||
name: python3 | ||
--- | ||
|
||
# Text-based Notebook | ||
|
||
```{code-cell} | ||
print("Hello, World!") | ||
``` |
Oops, something went wrong.