Skip to content

Update build.yml

Update build.yml #12

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Build Blog
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: pnpm/action-setup@v4
with:
version: latest
- name: Install softwatre dependencies
run: sudo apt-get install -y highlight imagemagick ipe bzip2 inkscape
- name: Setting up online LaTeX compilation
run: mkdir -p ~/.ipe/latexrun; echo "https://latexonline.cc" > ~/.ipe/latexrun/url1.txt
- name: Install soupault
env:
SOUPAULT_VERSION: 4.10.0
run: |
wget https://github.com/PataphysicalSociety/soupault/releases/download/$SOUPAULT_VERSION/soupault-$SOUPAULT_VERSION-linux-x86_64.tar.gz
tar xvf soupault-$SOUPAULT_VERSION-linux-x86_64.tar.gz
sudo mv -v ./soupault-$SOUPAULT_VERSION-linux-x86_64/soupault /usr/bin/
rm -rf soupault-$SOUPAULT_VERSION-linux-x86_64.tar.gz soupault-$SOUPAULT_VERSION-linux-x86_64
- name: Install pnpm dependencies
run: pnpm i
- name: Check formatting
run: pnpm exec prettier . --check
- name: Build
run: make build
- name: Install netlify tools
run: pnpm install -g netlify-cli
- name: Deploy to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: netlify deploy --dir build --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod