Skip to content

Commit

Permalink
Generate landing page for different Aspen versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Apr 30, 2024
1 parent f16c635 commit 62aab0f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ jobs:
ref: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- uses: actions/checkout@v2
with:
path: main
ref: main
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- name: list contents of build dir
run: ls -alh build

Expand All @@ -61,14 +69,22 @@ jobs:
run: ls -alh
- name: Execute schemaspy
run: docker run -u $(id -u ${USER}):$(id -g ${USER}) --network aspen-net -v $(realpath .)/build/${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}:/output schemaspy/schemaspy:latest -t mariadb -db aspen -host mydb -port 3306 -u root -p password -s aspen

- name: Install Template Toolkit
run: sudo apt install -y libtemplate-perl
- name: Commit files
run: |
pwd
cd build
ls -alh
ls -alh .
ls -alh ..
ls -alh ../..
ls -alh ../../..
git config --local user.email "kyle@bywatersolutions.com"
git config --local user.name "Kyle M Hall"
git add ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}
DIRS=$(ls -d */)
tpage --define DIRS="$DIRS" ../main/index.tt > index.html
git add index.tt
git commit -m "Add changes for ${{ steps.extracted_variables.outputs.ASPEN_DEFAULT_BRANCH }}" -a
cd ..
Expand Down
21 changes: 21 additions & 0 deletions index.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Aspen Discovery SchemaSpy</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
</head>
<body>

<div class="container my-5">
<h1>Versions</h1>
[%- FOREACH d IN DIRS.split("\n").reverse %]
<a href="https://aspen-discovery.github.io/aspen-schemaspy/[% d %]">[% d | html %]</a>
[%- END %]
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>

0 comments on commit 62aab0f

Please sign in to comment.