mirror of
https://github.com/Hopiu/djLint.git
synced 2026-04-05 15:00:58 +00:00
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Build and Format [Weekly]
|
|
|
|
on:
|
|
schedule:
|
|
- cron: 0 0 * * 0
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: '0'
|
|
|
|
- name: Update python deps
|
|
run: |
|
|
python -m pip install tox poetry tox-poetry poetry-up
|
|
poetry-up --install --no-commit
|
|
|
|
- name: python format
|
|
run: |
|
|
python -m pip install tox poetry tox-poetry
|
|
tox -e isort,black
|
|
|
|
- name: Pre-commit update
|
|
run: |
|
|
pip install pre-commit
|
|
pre-commit install
|
|
pre-commit autoupdate
|
|
|
|
- name: Update npm packages
|
|
run: |
|
|
cd docs
|
|
npm install
|
|
npm install -g npm-check-updates
|
|
# update deps
|
|
ncu -u
|
|
# update package lock
|
|
npm install
|
|
|
|
- name: npm format
|
|
run: |
|
|
cd docs
|
|
npm run format
|
|
|
|
- name: Stage, commit and push files
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
with:
|
|
commit_user_name: djlint-bot
|
|
commit_user_email: djlint-bot@users.noreply.github.com
|
|
commit_author: djlint-bot <djlint-bot@users.noreply.github.com>
|
|
commit_message: 'chore(build): update packages [Weekly]'
|
|
continue-on-error: true
|