Skip to content

Commit 324a6a6

Browse files
committed
Update to PreTeXt project source.
1 parent c44175e commit 324a6a6

File tree

6 files changed

+158
-1
lines changed

6 files changed

+158
-1
lines changed

.devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"ghcr.io/devcontainers/features/github-cli:1": {}
2727
},
2828

29+
// Respect the project's designated dependencies
30+
"postCreateCommand": "pip install -r requirements.txt",
31+
2932
// Port forwarding
3033
// ---------------
3134
// This is needed by the CodeChat Server.

.github/workflows/pretext-cli.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# <!-- Managed automatically by PreTeXt authoring tools -->
2+
# (delete the above line to manage this file manually)
3+
4+
name: PreTeXt-CLI Actions
5+
on:
6+
# Runs on pull requests
7+
pull_request:
8+
branches: ["*"]
9+
# Runs on pushes to main
10+
push:
11+
branches: ["main"]
12+
# Runs on demand
13+
workflow_dispatch:
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
container: oscarlevin/pretext:full
19+
20+
steps:
21+
- name: Checkout source
22+
uses: actions/checkout@v4
23+
24+
- name: install deps
25+
run: pip install -r requirements.txt
26+
27+
- name: build deploy targets
28+
run: pretext build --deploys
29+
- name: stage deployment
30+
run: pretext deploy --stage-only
31+
32+
- name: Bundle output/stage as artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: deploy
36+
path: output/stage
37+
38+
deploy-cloudflare:
39+
runs-on: ubuntu-latest
40+
needs: build
41+
if: vars.CLOUDFLARE_PROJECT_NAME != ''
42+
permissions:
43+
contents: read
44+
deployments: write
45+
46+
steps:
47+
- name: Download artifact
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: deploy
51+
path: deploy
52+
- name: Create 404.html
53+
run: echo "404 page not found" >> deploy/404.html
54+
- name: Publish to Cloudflare
55+
uses: cloudflare/pages-action@v1
56+
with:
57+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
58+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
59+
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
60+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
61+
branch: ${{ github.head_ref || github.ref_name }}
62+
directory: deploy
63+
64+
deploy-ghpages:
65+
runs-on: ubuntu-latest
66+
needs: build
67+
if: vars.PTX_ENABLE_DEPLOY_GHPAGES == 'yes' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
68+
permissions:
69+
contents: read
70+
pages: write
71+
id-token: write
72+
concurrency:
73+
group: "page"
74+
cancel-in-progress: false
75+
environment:
76+
name: github-pages
77+
url: ${{ steps.deployment.outputs.page_url }}
78+
steps:
79+
- name: Download website artifact
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: deploy
83+
path: deploy
84+
- name: Setup GitHub Pages
85+
id: check
86+
uses: actions/configure-pages@v4
87+
- name: Upload artifact
88+
uses: actions/upload-pages-artifact@v3
89+
with:
90+
path: deploy
91+
- name: Deploy to Github Pages
92+
id: deployment
93+
uses: actions/deploy-pages@v4

codechat_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ output_path: output/web
4646
# - ``{output_path}``: the ``output_path`` above, but as an absolute path.
4747
# - ``{sys_executable}``: the value of the running Python's `sys.executable <https://docs.python.org/3/library/sys.html#sys.executable>`_.
4848
# - ``{xml_id}``: The value of the the first ``xml:id`` attribute in the currently open file.
49-
args: "{sys_executable} -m pretext build web --xmlid {xml_id}"
49+
args: "{sys_executable} -m pretext build web --xmlid {xml_id} --no-knowls"
5050

5151
# ``html_ext``: optional; defaults to ``.html``. The extension used by this renderer when generating HTML files.
5252
#html_ext: .html

logs/20240809-100742.log

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,20 @@ INFO :
1313
INFO : Changes to project source since last commit detected.
1414
INFO : Add/committing these changes to local Git repository.
1515
INFO :
16+
INFO : Committing your latest build to the `gh-pages` branch.
17+
INFO :
18+
INFO : Attempting to connect to remote repository at `[email protected]:RunestoneInteractive/InstructorGuide.git`...
19+
INFO :
20+
INFO :
21+
INFO : Latest build successfully pushed to GitHub!
22+
INFO :
23+
INFO : To enable GitHub Pages, visit
24+
INFO : https://github.com/RunestoneInteractive/InstructorGuide/settings/pages
25+
INFO : selecting the `gh-pages` branch with the `/ (root)` folder.
26+
INFO :
27+
INFO : Visit
28+
INFO : https://github.com/RunestoneInteractive/InstructorGuide/actions/
29+
INFO : to check on the status of your GitHub Pages deployment.
30+
INFO :
31+
INFO : Your built project will soon be available to the public at:
32+
INFO : https://RunestoneInteractive.github.io/InstructorGuide/

logs/20240816-140836.log

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
INFO : PreTeXt-CLI version: 2.6.1
2+
3+
INFO : PreTeXt project found in `/Users/bmiller/Runestone/books/InstructorGuide`.
4+
WARNING : Using CLI version 2.6.1 but project's `requirements.txt`
5+
WARNING : is configured to use 1.0.1. Consider either installing
6+
WARNING : CLI version 1.0.1 or running `pretext init --refresh`
7+
WARNING : to update `requirements.txt` to match 2.6.1.
8+
INFO : Since no target was supplied, we will use "web".
9+
10+
INFO : Building target web
11+
INFO : Preparing to build into /Users/bmiller/Runestone/books/InstructorGuide/output/web.
12+
INFO : discovering source file's directory name: /Users/bmiller/Runestone/books/InstructorGuide/pretext
13+
INFO : verifying and expanding input directory: /Users/bmiller/Runestone/books/InstructorGuide/pretext/../generated-assets
14+
INFO : input directory expanded to absolute path: /Users/bmiller/Runestone/books/InstructorGuide/generated-assets
15+
INFO : verifying and expanding input directory: /Users/bmiller/Runestone/books/InstructorGuide/pretext/../assets
16+
INFO : input directory expanded to absolute path: /Users/bmiller/Runestone/books/InstructorGuide/assets
17+
INFO : Runestone Services (via PreTeXt repository): version 7.3.3
18+
INFO : Runestone Services (using newer, via online CDN query): version 7.3.6
19+
INFO : Downloading Runestone Services, version 7.3.6
20+
INFO : Extracting Runestone Services from archive file
21+
INFO : converting /Users/bmiller/Runestone/books/InstructorGuide/pretext/main.ptx to HTML in /var/folders/0n/p9pnz4rn5ldcx_kk2xp757n40000gn/T/ptx-bqujqydm
22+
INFO : XSL conversion of /Users/bmiller/Runestone/books/InstructorGuide/pretext/main.ptx by /Users/bmiller/.ptx/2.6.1/core/xsl/pretext-html.xsl
23+
INFO : successful application of /Users/bmiller/.ptx/2.6.1/core/xsl/pretext-html.xsl
24+
INFO :
25+
Success! Run `pretext view` to see the results.
26+
27+
INFO :

logs/20240816-141036.log

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
INFO : PreTeXt-CLI version: 2.6.1
2+
3+
INFO : PreTeXt project found in `/Users/bmiller/Runestone/books/InstructorGuide`.
4+
WARNING : Using CLI version 2.6.1 but project's `requirements.txt`
5+
WARNING : is configured to use 1.0.1. Consider either installing
6+
WARNING : CLI version 1.0.1 or running `pretext init --refresh`
7+
WARNING : to update `requirements.txt` to match 2.6.1.
8+
INFO : Staging deployment according to strategy default_target
9+
INFO : Since no target was supplied, we will use "web".
10+
11+
INFO : Staging latest build located in `/Users/bmiller/Runestone/books/InstructorGuide/output/web` at `/Users/bmiller/Runestone/books/InstructorGuide/output/stage`.
12+
INFO :
13+
INFO : Preparing to deploy from active `master` git branch.
14+
INFO :
15+
INFO : Changes to project source since last commit detected.
16+
INFO : Add/committing these changes to local Git repository.
17+
INFO :

0 commit comments

Comments
 (0)