chore: name second step #51
This file contains hidden or 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
| on: [push] | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| build_latex: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Install texml | ||
| - run: | | ||
| sudo apt-get update -y | ||
| mkdir -p ./build | ||
| sudo sh ./texml.sh | ||
| cd build | ||
| git clone https://github.com/AmerMathSoc/texml.git | ||
| cp ./texml/cfg/texml.cfg.template ./texml/cfg/texml.cfg | ||
| chmod a+x ./build/texml/bin/texml | ||
| - name: Generated PDF and XML | ||
| - run: | | ||
| rm -f main.aux | ||
| pdflatex main.tex | ||
| ./build/texml/bin/texml main.tex | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 'lts/*' | ||
| - name: Install & run texml-to-html | ||
| run: | | ||
| cd build | ||
| npm install @amermathsoc/texml-to-html | ||
| cd .. | ||
| node ./build/node_modules/@amermathsoc/texml-to-html/examples/cli.js main.xml > main.html | ||
| rm -rf ./build | ||
| - run: | | ||
| # Commit | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add . | ||
| git commit -m "chore: main xml&pdf&html regenerated" | ||
| git push | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||