Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy

on:
workflow_run:
workflows: ["Create and publish a Docker image"]
workflows: ['Create and publish a Docker image']
branches: [main]
types:
- completed
Expand All @@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Setup SSH key
shell: bash
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "${SSH_PRIVATE_KEY}" | base64 -d > ${HOME}/.ssh/deploy.id_rsa
chmod 700 ${HOME}/.ssh/deploy.id_rsa
- name: Update Docker container
shell: bash
run: |
ssh -i ${HOME}/.ssh/deploy.id_rsa -o StrictHostKeyChecking=no root@saturn.munichmakerlab.de << EOF
docker pull ghcr.io/munichmakerlab/website:main
systemctl restart docker-website.service
systemctl status docker-website.service
EOF
- name: Setup SSH key
shell: bash
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "${SSH_PRIVATE_KEY}" | base64 -d > ${HOME}/.ssh/deploy.id_rsa
chmod 700 ${HOME}/.ssh/deploy.id_rsa
- name: Update Docker container
shell: bash
run: |
ssh -i ${HOME}/.ssh/deploy.id_rsa -o StrictHostKeyChecking=no root@saturn.munichmakerlab.de << EOF
docker pull ghcr.io/munichmakerlab/website:main
systemctl restart docker-website.service
systemctl status docker-website.service
EOF
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
push-to-registry: true
27 changes: 27 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint & Format Check for Pull Requests

on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Check formatting with Prettier
run: npm run format:check
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"singleQuote": true,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ All commands are run from the root of the project, from a terminal:
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
| `npm run lint` | Lint the project with ESLint |
| `npm run format:check` | Check Code Styling with Prettier |

## 👀 Want to learn more?

Expand Down
6 changes: 3 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export default defineConfig({
integrations: [markdoc(), mdx(), icon(), vue()],
output: 'static',
adapter: node({
mode: 'standalone'
})
});
mode: 'standalone',
}),
});
18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import eslintPluginAstro from 'eslint-plugin-astro';
import eslintConfigPrettier from 'eslint-config-prettier/flat';

export default [
{ ignores: ['.astro/', 'dist/'] },
{ files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'], languageOptions: { globals: globals.browser } },
js.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
{ files: ['**/*.vue'], languageOptions: { parserOptions: { parser: tseslint.parser } } },
{ rules: { 'vue/multi-word-component-names': 'off' } },
...eslintPluginAstro.configs.recommended,
eslintConfigPrettier,
];
20 changes: 10 additions & 10 deletions markdoc.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"id": "website",
"path": "src/content",
"schema": {
"path": "markdoc.config.mjs",
"type": "esm",
"property": "default",
"watch": true
}
{
"id": "website",
"path": "src/content",
"schema": {
"path": "markdoc.config.mjs",
"type": "esm",
"property": "default",
"watch": true
}
]
}
]
Loading