Skip to content

Commit

Permalink
Merge pull request #24 from wuan/build_document
Browse files Browse the repository at this point in the history
Build document
  • Loading branch information
wuan authored Nov 15, 2022
2 parents 281d9c0 + 3aad0a8 commit c13c5ab
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1,135 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build document

on:
push:
tags: ["*"]
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: xu-cheng/latex-action@v2
with:
pre_compile: |
TMPDIR=`mktemp -d`
pushd $TMPDIR
wget https://github.com/sagemath/sagetex/archive/refs/tags/v3.6.zip -O sagetex.zip
unzip sagetex.zip
pushd sagetex-3.6
latex sagetex.ins
popd
popd
cp $TMPDIR/sagetex-3.6/sagetex.sty .
rm -rf $TMPDIR
compiler: pdflatex
root_file: main-moonmath.tex
- uses: wuan/sagemath-action@v1
with:
source_file: main-moonmath.sagetex.sage
- uses: xu-cheng/latex-action@v2
with:
root_file: main-moonmath.tex
- uses: actions/upload-artifact@v3
with:
name: MoonMath Manual PDF
path: main-moonmath.pdf
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./main-moonmath.pdf
asset_name: main-moonmath.pdf
asset_content_type: application/pdf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ _minted*
# sagetex
*.sagetex.sage
*.sagetex.py
*.sage.py
*.sagetex.scmd

# scrwfile
Expand Down
2 changes: 2 additions & 0 deletions chapters/license-moonmath.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
\chapter*{ }\addcontentsline{toc}{chapter}{License \& Sideletter}
\markboth{LICENSE \& SIDELETTER}{LICENSE \& SIDELETTER}
\markright{}
\label{chapter:license}
\begin{center}\Large
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License
Expand Down
Loading

0 comments on commit c13c5ab

Please sign in to comment.