Skip to content

Build This Sh11111

Build This Sh11111 #3

Workflow file for this run

name: Publish Maven Repo
on:
push:
branches: [ "main" ]
paths:
- 'jars/**'
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Generate Maven repo
run: python generate_data.py
- name: Deploy to repo branch (manual)
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git ls-remote --heads origin repo | grep -q repo; then
git fetch origin repo
git checkout repo
else
git checkout --orphan repo
fi
git rm -rf .
cp -r maven-repo/* .
git add .
git commit -m "Deploy Maven repo $(date)"
git push origin repo --force