mirror of
https://github.com/Karaka-Management/cssOMS.git
synced 2026-01-11 19:18:40 +00:00
implement automatic css compliation
This commit is contained in:
parent
b9294c0524
commit
ec54871542
29
.github/workflows/main.yml
vendored
Normal file
29
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: CI/CD
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build css:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'NO_CI')"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Compile CSS
|
||||
run: node-sass styles.scss styles.css
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||
- name: Push changes
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
run: |
|
||||
git config --global user.name 'Formatter Bot'
|
||||
git config --global user.email 'formatter.bot@orange-management.email'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
||||
git commit -am "Automated formatting changes"
|
||||
git push
|
||||
Loading…
Reference in New Issue
Block a user