Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jstn2004 committed May 8, 2024
2 parents 4709767 + 7168fd7 commit bf0ef2a
Show file tree
Hide file tree
Showing 197 changed files with 7,279 additions and 494 deletions.
20 changes: 10 additions & 10 deletions .github/DISCUSSION_TEMPLATE/statusberichte.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
title: "Week [Woche] ([Jahr] KW [Kalenderwoche], [Startdatum]-[Enddatum])"
title: 'Week [Woche] ([Jahr] KW [Kalenderwoche], [Startdatum]-[Enddatum])'
body:
- type: dropdown
attributes:
label: "Aktueller Status: "
label: 'Aktueller Status: '
options:
- 🟥
- 🟨
Expand All @@ -12,25 +12,25 @@ body:
required: true
- type: textarea
attributes:
label: "✅ Was ist diese Woche passiert?"
label: '✅ Was ist diese Woche passiert?'
placeholder: |
-
-
-
- type: textarea
attributes:
label: "👣 Was sind die nächsten Schritte?"
label: '👣 Was sind die nächsten Schritte?'
placeholder: |
-
-
-
- type: textarea
attributes:
label: "🤺 Was waren/sind eventuelle Hindernisse?"
label: '🤺 Was waren/sind eventuelle Hindernisse?'
placeholder: |
-
-
-
- type: textarea
attributes:
label: "💡 Was waren die Erkenntnisse dieser Woche?"
label: '💡 Was waren die Erkenntnisse dieser Woche?'
placeholder: |
-
-
-
38 changes: 20 additions & 18 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Backend

on:
Expand All @@ -8,25 +7,28 @@ on:

jobs:
verify:
runs-on: ubuntu-latest
environment: Tests

runs-on: [self-hosted]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install dependencies
run: cd backend && npm install
- name: Install dependencies
run: cd backend && npm install

- name: Reset the database (for e2e tests)
run: cd backend && npm run db:reset
- name: Reset the database (for e2e tests)
env:
DATABASE_URL: file:./database.dev.sqlite
run: cd backend && npm run db:reset

- name: Run verify
run: cd backend && npm run verify
- name: Run verify
env:
DATABASE_URL: 'file:./database.dev.sqlite'
run: cd backend && npm run verify
75 changes: 75 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

defaults:
run:
working-directory: ./docs

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
defaults:
run:
working-directory: ./docs
runs-on: [self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
cache-dependency-path: ./docs/package.json
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
defaults:
run:
working-directory: ./docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: [self-hosted]
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
20 changes: 20 additions & 0 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy application to staging environment

on:
push:
branches: [main]
workflow_dispatch:

jobs:
deploy:
runs-on: [self-hosted]
environment: staging
steps:
- name: Execute the build and run script on the server
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: "sh /services/duogradus/build-and-run.sh"
30 changes: 30 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docs

on:
pull_request_target:
branches:
- main

jobs:
verify:
runs-on: [self-hosted]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install dependencies
run: cd docs && npm install

- name: Run check format
run: cd docs && npm run check:format

- name: Run build
run: cd docs && npm run docs:build
27 changes: 13 additions & 14 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Frontend

on:
Expand All @@ -8,21 +7,21 @@ on:

jobs:
verify:
runs-on: ubuntu-latest
runs-on: [self-hosted]

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install dependencies
run: cd frontend && npm install
- name: Install dependencies
run: cd frontend && npm install

- name: Run tests
run: cd frontend && npm run test
- name: Run tests
run: cd frontend && npm run test
44 changes: 44 additions & 0 deletions .github/workflows/timetracking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Export timetracking statistics

on:
schedule:
- cron: '0 23 * * 2'
workflow_dispatch:

jobs:
generate:
runs-on: [self-hosted]
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch the current timetracking data
run: cd docs/guidelines/timetracking && ./get_data.sh
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Generate the desired charts
run: cd docs/guidelines/timetracking && python generate_charts.py
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
- uses: peterjgrainger/action-create-branch@v2.2.0
name: 'Create a new branch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'actions/new-timetracking-data'
sha: 'main'
- name: 'Checkout the new branch'
uses: actions/checkout@v4
with:
ref: 'actions/new-timetracking-data'
- name: 'Create a new Pull Request'
run: gh pr create -a benedictweis -B main --title \"Update timetracking data\""
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
.DS_STORE
.DS_STORE
.vscode
Loading

0 comments on commit bf0ef2a

Please sign in to comment.