Skip to content

Commit

Permalink
fix: cd
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosteiner committed Jan 26, 2024
1 parent 3aac786 commit 8e50641
Show file tree
Hide file tree
Showing 12 changed files with 10,943 additions and 187 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,9 @@ jobs:
cache: 'npm'
- name: Install and build astro
shell: 'bash'
env:
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
NEXT_PUBLIC_TINA_BRANCH: main
run: |
npm install
npm run build
- name: Copy TinaCMS artifacts
run: |
cp -R ./public/it-landscape/admin/ ./dist/
rm ./dist/admin/.gitignore
npm run build-astro
- name: Create Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .tina/__generated__/_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .tina/__generated__/client.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions pages/[slug].js

This file was deleted.

9 changes: 0 additions & 9 deletions pages/_app.js

This file was deleted.

35 changes: 0 additions & 35 deletions pages/index.js

This file was deleted.

1 change: 1 addition & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 0 additions & 58 deletions scripts/graphviz_simple.py

This file was deleted.

55 changes: 35 additions & 20 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
---
import { client } from "../../.tina/__generated__/client.js"
import { Debug } from 'astro:components'
import Layout from "../layouts/Layout.astro";
import { getServices } from "../../../src/services/data";
import { Service, ServiceConnectionEdges } from "../../.tina/__generated__/types";
const services = await getServices();
const services2 = await client.queries.service({relativePath: 'eCamp.yaml'})
const serviceResponse = await client.queries.serviceConnection()
// @ts-ignore
const serviceEdges: ServiceConnectionEdges[] = serviceResponse.data.serviceConnection.edges || []
const services = serviceEdges.map((service: ServiceConnectionEdges) => {
const lifecycle = service.node?.lifecycle || [];
const length: number = lifecycle?.length || 0
const productOwner = service.node?.product_owner?.name;
const dateString: string = service.node?.last_updated ? new Date(service.node?.last_updated).toLocaleDateString('de') : 'unknown'
return {
id: service.node?.id,
name: service.node?.name,
status: lifecycle[length -1]?.state,
product_owner: productOwner,
lastUpdated: dateString,
}
});
---

<Layout title="Services">
Expand All @@ -18,26 +33,26 @@ const services2 = await client.queries.service({relativePath: 'eCamp.yaml'})
<tr>
<td>Name</td>
<td>Status</td>
<td>Product Owner</td>
<td>last updated</td>
</tr>
</thead>$<Debug values={services2.data.service.has_sla}>
{
Array.from(services.values()).map((service) => (
<tr>
<td>
<a class="text-brombeer hover:underscore" href={`/it-landscape/services/${service.id}`}>
</thead>
{services?.map((service) => <tr>
<td>
<a class="text-brombeer hover:underscore" href={`/it-landscape/services/${service.name}`}>
{service.name}
</a>
</td>
<td>
<span class="bg-green-100 text-green-800 text-xs font-medium mr-2 px-2.5 py-0.5 rounded">{service.lifecycle[service.lifecycle.length -1].state}</span>
</td>
<td>
{new Date(service.last_updated).toLocaleDateString('de')}
</td>
</tr>
))
}
</td>
<td>
<span class="bg-green-100 text-green-800 text-xs font-medium mr-2 px-2.5 py-0.5 rounded">{service.status}</span>
</td>
<td>
{service.product_owner}
</td>
<td>
{service.lastUpdated}
</td>
</tr>) }
</table>
</main>
</Layout>
Loading

0 comments on commit 8e50641

Please sign in to comment.