mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-31 20:11:59 +02:00
78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: CI-CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'components/**'
|
|
- 'images/**'
|
|
- 'lib/**'
|
|
- 'stylesheets/**'
|
|
- 'tools/**'
|
|
- 'changelog.js'
|
|
- 'index.template.html'
|
|
- 'webpack.config.js'
|
|
|
|
jobs:
|
|
build:
|
|
name: Building the Primer website
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Installing TeX Live
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install xzdec libpoppler-glib-dev texlive texlive-xetex texlive-extra-utils -y
|
|
|
|
- name: Installing pdf2svg
|
|
run: |
|
|
set +e
|
|
rm -f *.tar.gz
|
|
set -e
|
|
wget https://github.com/dawbarton/pdf2svg/archive/v0.2.3.tar.gz
|
|
tar -zxf v0.2.3.tar.gz
|
|
cd pdf2svg-0.2.3
|
|
./configure
|
|
make
|
|
sudo make install
|
|
cd ..
|
|
set +e
|
|
rm -rf pdf2svg-0.2.3
|
|
rm v0.2.3.tar.gz
|
|
pdf2svg
|
|
set -e
|
|
|
|
- name: Installing latest Node
|
|
run: |
|
|
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
|
|
sh ~/.nvm/nvm.sh install latest
|
|
sh ~/.nvm/nvm.sh use latest
|
|
|
|
- name: Installing dependencies
|
|
run: |
|
|
npm install
|
|
echo "finished installing dependencies"
|
|
|
|
- name: Running npm build
|
|
run: |
|
|
echo "running build..."
|
|
npm run ci:build
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
echo "forming commit..."
|
|
git status
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "Bezierinfo CI"
|
|
set +e
|
|
git add -A
|
|
git commit -m "Automated build"
|
|
set -e
|
|
|
|
- name: Push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|