Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Resolve #112 and fix broken PDF output" #186

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
9 changes: 0 additions & 9 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
//////////////////////////////////////////////////////////////
//
// This file provides configuration options so that a PreTeXt
// project can be edited and built using GitHub's Codespaces.
// It is recommended to keep this in your repository even if you
// do not use this feature, as it will allow other to explore
// your project easily.
//
///////////////////////////////////////////////////////////////
{
"name": "PreTeXt-Codespaces",

Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/pretext-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,27 @@ on:
# Runs on pull requests
pull_request:
branches: ["*"]

# Runs on pushes to main
push:
branches: ["main"]

# Runs on demand
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: oscarlevin/pretext:full

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
apt-get update
apt-get install -y inkscape
shell: bash

- name: Verify Inkscape Installation
run: inkscape --version

- name: install deps
run: |
pip install -r requirements.txt
pretext --version

- name: ensure proper asset type in image references
run: ./update-img-refs.py source/ --to-svg
run: pip install -r requirements.txt

- name: build deploy targets
run: |
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
run: pretext build --deploys

- name: stage deployment
run: pretext deploy --stage-only

Expand All @@ -62,11 +33,6 @@ jobs:
name: deploy
path: output/stage

- name: ensure proper asset type in image references for pdf output
run: |
make svg-to-pdf
./update-img-refs.py source/ --to-pdf

- name: Build PDF with PreTeXt
run: pretext build print

Expand Down Expand Up @@ -140,7 +106,7 @@ jobs:

- name: Commit changes
run: |
git add output/print/discrete-math-with-sage.pdf
git add output/print/main.pdf
git commit -m "Update PDF" || echo "No changes to commit"

- name: Force push to pdf-update branch
Expand Down
16 changes: 1 addition & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# ensure this file is tracked
!.gitignore

# don't track unpublished builds or stage (note: Runestone uses `published`)
# don't track unpublished builds or stage
output/web
output/stage
published

# don't track assets generated from source
generated-assets
Expand Down Expand Up @@ -99,16 +98,3 @@ codechat_config.yaml

# Don't track local files under /venv (virtual local environment)
venv

# Don't track local temp files and generated files
*.local
*.bak
*.swp
*.old
*.log
*.tmp
assets/*/*.pdf

# Don't track deprecated workflows
.github/workflows/deploy.yml
.github/workflows/test-build.yml
44 changes: 0 additions & 44 deletions Makefile

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions assets/finite-state-machines/first_traffic_light_FSM.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading