-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
15 changed files
with
90 additions
and
2 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,15 @@ | ||
{ | ||
"name": "latex-project", | ||
"version": "1.0.0", | ||
"description": "A project for compiling and publishing LaTeX documents as GitHub packages.", | ||
"scripts": { | ||
"build": "pdflatex src/main.tex && pdflatex src/appendix.tex", | ||
"publish": "npm run build && npm publish" | ||
}, | ||
"dependencies": { | ||
"latex": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"gh-pages": "^3.2.3" | ||
} | ||
} |
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,55 @@ | ||
name: Compile and Publish LaTeX | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up LaTeX | ||
run: sudo apt-get install texlive-full | ||
|
||
- name: Create output directory | ||
run: mkdir -p pdf_output | ||
|
||
- name: Compile LaTeX documents | ||
run: | | ||
# Find all .tex files and compile them | ||
for file in $(find . -name "*.tex" -type f); do | ||
filename=$(basename "$file" .tex) | ||
# First pass | ||
pdflatex -interaction=nonstopmode "$filename.tex" | ||
# Second pass for references | ||
pdflatex -interaction=nonstopmode "$filename.tex" | ||
# Move PDF to output directory | ||
mv "$filename.pdf" ./pdf_output/ | ||
done | ||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# Create a timestamp for the version | ||
VERSION="v$(date +'%Y%m%d%H%M%S')" | ||
# Create release with all PDFs | ||
gh release create "$VERSION" \ | ||
--title "LaTeX Documents $(date +'%Y-%m-%d')" \ | ||
--notes "Automatically generated PDFs from LaTeX sources" \ | ||
pdf_output/*.pdf | ||
- name: Upload Release Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: latex-pdfs | ||
path: pdf_output/*.pdf |
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 @@ | ||
.vscode/ |
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,16 @@ | ||
{ | ||
"files.exclude": { | ||
"**/*.vo": true, | ||
"**/*.vok": true, | ||
"**/*.vos": true, | ||
"**/*.aux": true, | ||
"**/*.glob": true, | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/*.crswap": true | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.