Merge pull request #286 from jerimiah-smiggins/main #103
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
name: Compile TS/LESS | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Compile | |
run: | | |
npm i -g typescript less less-plugin-clean-css | |
tsc | |
python3 compile-less.py | |
- name: Commit | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add smiggins/templates/js | |
git add smiggins/templates/css | |
git diff --cached --quiet || (git commit -m 'Compile TS/LESS' && git push) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |