Skip to content

Season 8 game 4-7

Season 8 game 4-7 #38

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Install Flyway
- name: Install Flyway CLI
run: |
curl -L https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/10.18.2/flyway-commandline-10.18.2-linux-x64.tar.gz -o flyway.tar.gz
tar -xzf flyway.tar.gz
sudo mv flyway-10.18.2 /usr/local/flyway
sudo ln -s /usr/local/flyway/flyway /usr/local/bin/flyway
flyway -v # Verify the installation
# Step 3: Run Flyway migrations
- name: Run Flyway Migrations on SQLite
run: |
flyway -url=jdbc:sqlite:ai-survivor.sqlite -locations=filesystem:data migrate
# Step 4: Upload the SQLite database as an artifact
- name: Upload SQLite database artifact
uses: actions/upload-artifact@v4
with:
name: ai-survivor.sqlite
path: ai-survivor.sqlite
# Step 5: Install SchemaSpy
- name: Install SchemaSpy
if: github.ref == 'refs/heads/main' # Condition for main branch
run: |
curl -L https://github.com/schemaspy/schemaspy/releases/download/v6.1.0/schemaspy-6.1.0.jar -o schemaspy.jar
sudo apt-get update -qq && sudo apt-get install -qq -y openjdk-21-jdk graphviz
# Step 6: Generate SchemaSpy Report
- name: Generate SchemaSpy Report
if: github.ref == 'refs/heads/main' # Condition for main branch
run: |
curl -L https://github.com/xerial/sqlite-jdbc/releases/download/3.46.1.3/sqlite-jdbc-3.46.1.3.jar -o sqlite-jdbc.jar
java -jar schemaspy.jar -debug -dp sqlite-jdbc.jar -t sqlite-xerial -db ai-survivor.sqlite -u dummy -p dummy -cat % -s % -o schemaspy-output
# Step 7: Deploy to GitHub Pages
- name: Deploy SchemaSpy to GitHub Pages
if: github.ref == 'refs/heads/main' # Condition for main branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: schemaspy-output