Skip to content

Commit

Permalink
Fix CI minor typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaprieto committed Nov 25, 2024
1 parent 4023aec commit 8893a35
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ jobs:
run: poetry run pytest
- name: Create MkDocs Project
run: |
juvix-mkdocs new -f -n --no-run-server --no-open --project-name
my-juvix-project --anoma-setup
juvix-mkdocs new -f -n -D --no-run-server --no-open --project-name my-juvix-project --anoma-setup
- name: Build MkDocs Project
run: juvix-mkdocs build -p my-juvix-project
env:
NO_INTERACTION: true
SITE_URL: https://anoma.github.io/juvix-mkdocs
SITE_NAME: Juvix MkDocs
- if: success()
Expand Down
25 changes: 13 additions & 12 deletions mkdocs_juvix/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import json
import os
import shutil
import subprocess
import textwrap
Expand Down Expand Up @@ -1556,11 +1557,8 @@ class JuvixPlugin(BasePlugin):
wikilinks_plugin: WikilinksPlugin
first_run: bool = True
response: Optional[str] = None
use_juvix_question = questionary.select(
"Do you want to process Juvix Markdown files (this will take longer)?",
choices=["yes", "no", "always", "never"],
default="no",
)
use_juvix_question: Optional[questionary.Question] = None


def on_startup(self, *, command: str, dirty: bool) -> None:
clear_screen()
Expand All @@ -1571,14 +1569,17 @@ def on_config(self, config: MkDocsConfig) -> MkDocsConfig:

self.env.SITE_DIR = config.get("site_dir", getenv("SITE_DIR", None))

# ask the user if they want to process Juvix Markdown files, options,
# yes no, always, never
if self.response in ["yes", "no"] or self.response is None:
if not os.environ.get("CI") or os.getenv("NO_INTERACTION"):
self.use_juvix_question = questionary.select(
"Do you want to process Juvix Markdown files (this will take longer)?",
choices=["yes", "no", "always", "never"],
default="no",
)
self.response = self.use_juvix_question.ask()
if self.response == "never":
self.env.JUVIX_ENABLED = False
elif self.response == "always":
self.env.JUVIX_ENABLED = True
if self.response == "never":
self.env.JUVIX_ENABLED = False
elif self.response == "always":
self.env.JUVIX_ENABLED = True

if self.env.JUVIX_ENABLED and not self.env.JUVIX_AVAILABLE:
log.error(
Expand Down

0 comments on commit 8893a35

Please sign in to comment.