CI
Build Successful The Ravenous rulebook and balance report were built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good
Details
Build Successful The Ravenous rulebook and balance report were built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good
Details
This commit is contained in:
parent
f6dd412156
commit
99725b8e26
|
|
@ -8,6 +8,9 @@ pipeline {
|
|||
SOURCE_FILE = "main.typ"
|
||||
OUTPUT_FILE = "Ravenous_build.pdf"
|
||||
PUBLISHED_FILE = "Ravenous.pdf"
|
||||
BALANCE_SOURCE_FILE = "balance_report.typ"
|
||||
BALANCE_OUTPUT_FILE = "Ravenous_balance_report_build.pdf"
|
||||
BALANCE_PUBLISHED_FILE = "Ravenous_balance_report.pdf"
|
||||
|
||||
// Important: published books live under /mnt/books
|
||||
DEPLOY_DIR = "/mnt/books/Ravenous"
|
||||
|
|
@ -50,7 +53,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Build Book') {
|
||||
stage('Build PDFs') {
|
||||
steps {
|
||||
sh '''
|
||||
set -e
|
||||
|
|
@ -61,24 +64,28 @@ pipeline {
|
|||
echo "Building ${SOURCE_FILE} -> ${OUTPUT_FILE}"
|
||||
typst compile "${SOURCE_FILE}" "${OUTPUT_FILE}"
|
||||
|
||||
test -f "${OUTPUT_FILE}"
|
||||
echo "Building ${BALANCE_SOURCE_FILE} -> ${BALANCE_OUTPUT_FILE}"
|
||||
typst compile "${BALANCE_SOURCE_FILE}" "${BALANCE_OUTPUT_FILE}"
|
||||
|
||||
echo "Build complete:"
|
||||
ls -lh "${OUTPUT_FILE}"
|
||||
test -f "${OUTPUT_FILE}"
|
||||
test -f "${BALANCE_OUTPUT_FILE}"
|
||||
|
||||
echo "Builds complete:"
|
||||
ls -lh "${OUTPUT_FILE}" "${BALANCE_OUTPUT_FILE}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive Book') {
|
||||
stage('Archive PDFs') {
|
||||
steps {
|
||||
archiveArtifacts(
|
||||
artifacts: "${OUTPUT_FILE}",
|
||||
artifacts: "${OUTPUT_FILE},${BALANCE_OUTPUT_FILE}",
|
||||
fingerprint: true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy Book') {
|
||||
stage('Deploy PDFs') {
|
||||
steps {
|
||||
script {
|
||||
def reviewBranches = [
|
||||
|
|
@ -120,24 +127,24 @@ pipeline {
|
|||
publishChecks(
|
||||
conclusion: 'SUCCESS',
|
||||
name: 'Build Successful',
|
||||
summary: 'The Ravenous rulebook was built successfully.',
|
||||
text: 'Typst compilation and publication succeeded.',
|
||||
summary: 'The Ravenous rulebook and balance report were built successfully.',
|
||||
text: 'The rulebook and balance report were compiled and published successfully.',
|
||||
title: 'Build Successful'
|
||||
)
|
||||
|
||||
echo '✅ Ravenous book built and published!'
|
||||
echo '✅ Ravenous book and balance report built and published!'
|
||||
}
|
||||
|
||||
failure {
|
||||
publishChecks(
|
||||
conclusion: 'FAILURE',
|
||||
name: 'Build Failed',
|
||||
summary: 'The Ravenous rulebook build failed.',
|
||||
text: 'Typst compilation or publication failed.',
|
||||
summary: 'A Ravenous PDF build or deployment failed.',
|
||||
text: 'Rulebook or balance-report compilation/publication failed.',
|
||||
title: 'Build Failed'
|
||||
)
|
||||
|
||||
echo '❌ Ravenous book failed to build or publish.'
|
||||
echo '❌ A Ravenous PDF failed to build or publish.'
|
||||
}
|
||||
|
||||
unstable {
|
||||
|
|
@ -156,10 +163,10 @@ pipeline {
|
|||
|
||||
|
||||
/**
|
||||
* Publish the generated Ravenous PDF.
|
||||
* Publish the generated Ravenous PDFs.
|
||||
*
|
||||
* The build artifact remains named Ravenous_build.pdf in Jenkins,
|
||||
* while the published copy always has the stable Ravenous.pdf name.
|
||||
* Build artifacts retain explicit CI names in Jenkins, while published copies
|
||||
* use stable rulebook and balance-report names.
|
||||
*
|
||||
* @param targetDir Directory receiving the compiled book.
|
||||
*/
|
||||
|
|
@ -167,7 +174,7 @@ def deployTo(String targetDir) {
|
|||
sh """
|
||||
set -e
|
||||
|
||||
echo "Publishing Ravenous to ${targetDir}"
|
||||
echo "Publishing Ravenous and its balance report to ${targetDir}"
|
||||
|
||||
mkdir -p "${targetDir}"
|
||||
|
||||
|
|
@ -175,7 +182,13 @@ def deployTo(String targetDir) {
|
|||
"${env.OUTPUT_FILE}" \
|
||||
"${targetDir}/${env.PUBLISHED_FILE}"
|
||||
|
||||
rsync -a \
|
||||
"${env.BALANCE_OUTPUT_FILE}" \
|
||||
"${targetDir}/${env.BALANCE_PUBLISHED_FILE}"
|
||||
|
||||
echo "Published:"
|
||||
ls -lh "${targetDir}/${env.PUBLISHED_FILE}"
|
||||
ls -lh \
|
||||
"${targetDir}/${env.PUBLISHED_FILE}" \
|
||||
"${targetDir}/${env.BALANCE_PUBLISHED_FILE}"
|
||||
"""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ Install [Typst](https://typst.app/docs/reference/), clone the repository with it
|
|||
git clone --recurse-submodules <repository-url>
|
||||
cd ravenous_typst
|
||||
typst compile main.typ main.pdf
|
||||
typst compile balance_report.typ balance_report.pdf
|
||||
```
|
||||
|
||||
For live rebuilding while editing, use:
|
||||
|
|
@ -28,6 +29,7 @@ typst compile main.typ main.pdf
|
|||
## Project layout
|
||||
|
||||
- `main.typ` is the rulebook entry point.
|
||||
- `balance_report.typ` is the automatically generated balance-analysis report.
|
||||
- `chapters/` contains the book's content.
|
||||
- `setup/` contains shared styles, models, and macros.
|
||||
- `images/` and `data/` contain supporting assets and game data.
|
||||
|
|
|
|||
Loading…
Reference in New Issue