mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-14 18:15:49 +00:00
44 lines
1,019 B
YAML
44 lines
1,019 B
YAML
name: Grunt
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm install --save-dev
|
|
|
|
#- name: Generate documentation
|
|
# run: npm run doc
|
|
|
|
- name: Run stylelint autofix
|
|
run: npm run fix
|
|
|
|
- name: Run eslint and stylelint test
|
|
run: npm run test
|
|
|
|
# Only patch code when it is a push event
|
|
- name: Push the changes
|
|
if: github.event_name == 'push'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config --global user.name "github-actions"
|
|
git config --global user.email "github-actions@users.noreply.github.com"
|
|
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
|
git add .
|
|
git commit -am "Github CI lint - eslint/stylelint" || echo "No changes to commit"
|
|
git push
|