Skip to content

ci: Add lines of code workflow #114

ci: Add lines of code workflow

ci: Add lines of code workflow #114

Workflow file for this run

name: Seria's CI
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * 1' # every Monday at 00:00
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create release
uses: seriaati/create-release@main
update-deps:
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update dependencies & pre-commits
uses: seriaati/update-deps@main
lines-of-code:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create badge
uses: shadowmoose/GHA-LoC-Badge@1.0.0
with:
directory: ./
badge: ./output/badge.svg
patterns: '*.py'
ignore: 'migrations/models | hoyo_buddy/constants.py | hoyo_buddy/emojis.py | hoyo_buddy/icons.py'
- name: Print the output
run: |
echo "Scanned: ${{ steps.badge.outputs.counted_files }}";
echo "Line Count: ${{ steps.badge.outputs.total_lines }}";
- name: Deploy to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'