tests #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Maven Repo | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'jars/**' | |
| - 'site/**' | |
| - 'generate_data.py' | |
| 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: Generate assets | |
| run: python .root/generate_site_assets.py | |
| - name: Install requests | |
| run: pip install requests | |
| - name: Download all releases | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python download_jars.py | |
| ls -R | |
| # - name: Deploy to repo branch | |
| # run: | | |
| # git config user.name "github-actions[bot]" | |
| # git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # | |
| # mv maven-repo ../maven-repo-temp | |
| # mv site ../site-temp | |
| # | |
| # if git ls-remote --heads origin repo | grep -q repo; then | |
| # git fetch origin repo | |
| # git checkout -f repo | |
| # else | |
| # git checkout --orphan repo | |
| # fi | |
| # | |
| # git rm -rf . 2>/dev/null || true | |
| # | |
| # cp -r ../maven-repo-temp/* . | |
| # cp -r ../site-temp/. . | |
| # touch .nojekyll | |
| # | |
| # rm -rf ../maven-repo-temp ../site-temp | |
| # | |
| # git add . | |
| # git commit -m "Deploy Maven repo and site $(date)" | |
| # git push origin repo --force |