generated from PreTeXtBook/pretext-codespace
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e75c0f1
commit 221995d
Showing
6 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# <!-- Managed automatically by PreTeXt authoring tools --> | ||
# (delete the above line to manage this file manually) | ||
|
||
name: Deploy to GitHub pages | ||
on: | ||
# Uncomment to automatically deploy when a commit is pushed to | ||
# the main (or otherwise configured) branch (and remove auto | ||
# management line at top of this file) | ||
push: | ||
branches: ["main"] | ||
# The below allows for manually deploying by running the action | ||
# via GitHub.com | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# This job builds the book. You can download the resulting build "artifact" by | ||
# navigating to your actions manager in Github, selecting this run, and clicking | ||
# "download artifact" on the "website" artifact. | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build web with PreTeXt | ||
uses: siefkenj/pretext-build-action@main | ||
with: | ||
pretext-command: build web | ||
project-root: "." | ||
output-dir: "." | ||
|
||
- name: Stage with PreTeXt | ||
uses: siefkenj/pretext-build-action@main | ||
with: | ||
pretext-command: deploy --stage-only | ||
project-root: "." | ||
output-dir: "." | ||
|
||
- name: Bundle output/stage as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: website | ||
path: output/stage | ||
|
||
# This job deploys the artifact built in the previous job to Github pages. | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: "page" | ||
cancel-in-progress: false | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Download website artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: website | ||
path: website | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./website" | ||
- name: Deploy to Github Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# <!-- Managed automatically by PreTeXt authoring tools --> | ||
# (delete the above line to manage this file manually) | ||
|
||
name: Test Build | ||
on: | ||
# Runs on pull requests, when a pull request is merged into main, | ||
# and when a commit is otherwise pushed to main. | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
# This job builds the book. You can download the resulting build "artifact" by | ||
# navigating to your actions manager in Github, selecting this run, and clicking | ||
# "download artifact" on the "website" artifact. | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build web target with PreTeXt | ||
uses: siefkenj/pretext-build-action@main | ||
with: | ||
pretext-command: build web | ||
project-root: "." | ||
output-dir: "." | ||
|
||
- name: Bundle output/web as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: website | ||
path: output/web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- This file, the project manifest, provides the overall configuration for your PreTeXt project. To edit the content of your document, open `source/main.ptx`. See https://pretextbook.org/doc/guide/html/processing-CLI.html#cli-project-manifest. --> | ||
<project ptx-version="2"> | ||
<targets> | ||
<target name="web" format="html" deploy-dir="." /> | ||
<target name="print" format="pdf" deploy-dir="./pdf" output-filename="g4m.pdf" /> | ||
<target name="web" format="html" /> | ||
<target name="print" format="pdf" /> | ||
</targets> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project ptx-version="2"> | ||
<targets> | ||
<target name="web" format="html" deploy-dir="." /> | ||
<target name="print" format="pdf" deploy-dir="./pdf" output-filename="g4m.pdf" /> | ||
</targets> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# <!-- Managed automatically by PreTeXt authoring tools --> | ||
pretext == 2.3.4 | ||
pretext == 2.4.0 |