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
27 changes: 16 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was automatically generated with PreTeXt 2.17.1.
// This file was automatically generated with PreTeXt 2.24.0.
// If you modify this file, PreTeXt will no longer automatically update it.
//
//////////////////////////////////////////////////////////////
Expand All @@ -13,15 +13,16 @@
//
///////////////////////////////////////////////////////////////
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {},
"image": "pretextbook/pretext-full:1.2", // uses latest image from https://hub.docker.com/r/PreTeXtBook/pretext-full/tags
// If you don't need sagemath, you can use a smaller base image. Comment out the line above and uncomment the line below to use a smaller image.
// "image": "pretextbook/pretext:1.2",
"features": {"ghcr.io/devcontainers/features/github-cli": {}},

// Comment or uncomment lines below if you don't or do need that feature.
// The pretext-full image above includes pretext, prefigure, and enough parts of latex and sagemath for most cases. If there are errors with sage, you can install the full sagemath package through Conda by running ./.devcontainer/installSage.sh, or uncommenting that line and rebuilding the container.
"postCreateCommand": {
"install sagemath": "bash ./.devcontainer/installSage.sh",
// "install pandoc": "bash ./.devcontainer/installPandoc.sh",
"install latex": "bash ./.devcontainer/installLatex.sh",
"install pretext": "bash ./.devcontainer/installPretext.sh",
"install pandoc": "bash ./.devcontainer/installPandoc.sh",
"update requirements": "pip install -r requirements.txt",
"generate codechat": "pretext init -f codechat_config.yaml",
"mark repo as safe": "git config --global --add safe.directory $(pwd)"
},

Expand Down Expand Up @@ -68,13 +69,17 @@
"editor.quickSuggestions": {
"other": "off"
},
"editor.snippetSuggestions": "top",
"xml.validation.enabled": false,
"files.autoSave": "onFocusChange",
"editor.snippetSuggestions": "bottom",
"xml.validation.enabled": true,
"redhat.telemetry.enabled": false,
"CodeChat.CodeChatServer.Command": "CodeChat_Server"
},
"extensions": [
"oscarlevin.pretext-tools",
"CodeChat.codechat"
"CodeChat.codechat",
"streetsidesoftware.code-spell-checker",
"alpinebuster.vscode-latex-table-editor"
]
}
}
Expand Down
29 changes: 0 additions & 29 deletions .devcontainer/installLatex.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .devcontainer/installPandoc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# This file was automatically generated with PreTeXt 2.17.1.
# This file was automatically generated with PreTeXt 2.24.0.
# If you modify this file, PreTeXt will no longer automatically update it.

wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-1-amd64.deb -O pandoc.deb
Expand Down
27 changes: 0 additions & 27 deletions .devcontainer/installPretext.sh

This file was deleted.

22 changes: 0 additions & 22 deletions .devcontainer/installSage.sh

This file was deleted.

38 changes: 23 additions & 15 deletions .github/workflows/pretext-cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was automatically generated with PreTeXt 2.17.1.
# This file was automatically generated with PreTeXt 2.24.0.
# If you modify this file, PreTeXt will no longer automatically update it.
#
# This workflow file can be used to automatically build a project and create
Expand All @@ -21,29 +21,37 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: oscarlevin/pretext-full

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Install the things
run: |
bash ./.devcontainer/installSage.sh
bash ./.devcontainer/installLatex.sh
bash ./.devcontainer/installPretext.sh
git config --global --add safe.directory $(pwd)
- name: install deps
run: pip install -r requirements.txt

- name: set up node
uses: actions/setup-node@v4
with:
node-version: '22'

- name: install local ptx files
run: pretext --version

- name: build deploy targets
run: |
eval "$('conda' 'shell.bash' 'hook' 2> /dev/null)"
conda activate sage
pretext build --deploys

version="$(pretext --version)"
major="$(echo $version | cut -d '.' -f 1)"
minor="$(echo $version | cut -d '.' -f 2)"
if [ "$major" -ge 2 -a "$minor" -ge 5 ]; then
echo "PreTeXt version is 2.5 or greater; using new build command"
pretext build --deploys
else
echo "PreTeXt version is less than 2.5, using old build command"
pretext build
fi
- name: stage deployment
run: |
eval "$('conda' 'shell.bash' 'hook' 2> /dev/null)"
conda activate sage
pretext deploy --stage-only
run: pretext deploy --stage-only

- name: Bundle output/stage as artifact
uses: actions/upload-artifact@v4
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pretext-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was automatically generated with PreTeXt 2.17.1.
# This file was automatically generated with PreTeXt 2.24.0.
# If you modify this file, PreTeXt will no longer automatically update it.
#

Expand Down Expand Up @@ -28,12 +28,17 @@ permissions:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container: oscarlevin/pretext:small
container: pretextbook/pretext-full:1.2

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: set up node
uses: actions/setup-node@v4
with:
node-version: '22'

- name: add gh-cli
run: |
apt-get update
Expand Down Expand Up @@ -61,4 +66,3 @@ jobs:
run: git push origin gh-pages --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was automatically generated with PreTeXt 2.17.1.
# This file was automatically generated with PreTeXt 2.24.0.
# If you modify this file, PreTeXt will no longer automatically update it.
#
# Boilerplate list of files in a PreTeXt project for git to ignore
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file was automatically generated with PreTeXt 2.17.1.
pretext == 2.17.1
# This file was automatically generated with PreTeXt 2.24.0.
pretext == 2.24.0