-
Notifications
You must be signed in to change notification settings - Fork 21
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
GitHub action for pretext deploy
#644
Comments
My attempt (which fails) at this is name: cmh-deploy-gh-pages
on:
push:
jobs:
cmh-preTeXt-build:
runs-on: ubuntu-latest
steps:
- name: install python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install pretext
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install --upgrade pretext
- name: load the "base actions/checkout" so as to access cmh-preTeXt-explore
uses: actions/checkout@v4
- name: cmh-build-html
run: pretext build web
- name: cmh-deploy-html
run: pretext deploy Here's a link to my repo: https://github.com/cmhughes/preTeXt-cmh-explore/tree/main and the failing action log: https://github.com/cmhughes/preTeXt-cmh-explore/actions/runs/7583169500/job/20654242271 I'd love to know what I'm doing wrong, and if anyone knows how to fix this. |
Thanks for the attempt! I haven't looked closely at this PR, but my hot take is that the issue here is that I wouldn't expect |
Thanks for the response 😊 Just to be clear, I'm not submitting a pull request (PR). I'm a little confused about your point as looking at the following, which is run from within the devcontainer, this looks very much like a github action https://github.com/cmhughes/preTeXt-cmh-explore/actions/runs/7581933289 But I've probably misunderstood things! |
For anyone interested, I've now got a working demonstration of this at https://github.com/cmhughes/preTeXt-cmh-explore using the following GitHubActions name: cmh-deploy-gh-pages
on:
push:
permissions:
contents: write
jobs:
cmh-preTeXt-build:
runs-on: ubuntu-latest
steps:
- name: install python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install pretext
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install --upgrade pretext
- name: load the "base actions/checkout" so as to access cmh-preTeXt-explore
uses: actions/checkout@v4
- name: cmh-build-html
run: pretext build web
- name: cmh-deploy-html-NEW
# https://github.com/marketplace/actions/deploy-to-github-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: output/web references/links
my next stepI'm hoping to append the above to produce a (latex-generated) pdf, and deploy it somewhere appropriate to the repo above. |
Thanks - taking a closer look now. I think you figured out what I poorly alluded to the other day: rather than using My next hint would be that the basic |
In an ideal world, I should be able to push my updated PreTeXt project to main, and then GitHub actions builds/generates everything and deploys it. This is particularly useful for projects such as https://github.com/TeamBasedInquiryLearning/linear-algebra that involve multiple contributors: I'd especially love to see a preview of the built project on every pull request, or a failed CI notification when the project doesn't build with the proposed contribution. Then when I thumbs-up the contribution and merge it into main, I get a fresh build and deployment automatically.
The text was updated successfully, but these errors were encountered: