From 7dd12e943cf11ef492e8a74e6c60b72e2a418005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Ganzenm=C3=BCller?= Date: Wed, 29 Oct 2025 22:24:56 +0100 Subject: [PATCH 1/2] GH-ction workflows refactoren --- .github/copilot-instructions.md | 41 +++++++++++++++++++++++++ .github/dependabot.yml | 7 ++++- .github/workflows/build-prs-to-main.yml | 19 +++++++++--- .github/workflows/deploy-page.yml | 19 +++++++++--- 4 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..a0d731e061 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,41 @@ +# GitHub Copilot Instructions + +## Project Overview +This is a personal homepage/blog built with Eleventy (11ty) static site generator. + +### Tech Stack +- **Static Site Generator**: Eleventy v3 +- **Styling**: TailwindCSS with Typography plugin +- **Templating**: Nunjucks (primary), Markdown +- **Build Tools**: PostCSS, Autoprefixer, cssnano +- **Linting**: ESLint with Stylistic plugin, Prettier + +### Project Structure +- `src/` - Source files (posts, pages, templates, styles, data) +- `_site/` - Generated static site output +- `src/_includes/` - Nunjucks layouts and partials +- `src/_11ty/` - Eleventy plugins and custom filters +- `src/_data/` - Global data files +- `src/posts/` - Blog posts in Markdown +- `src/pages/` - Static pages +- `src/styles/` - TailwindCSS source files + +## Code Style and Conventions + +### General Guidelines +- Use German for content, comments can be in German or English +- Follow existing code patterns and naming conventions +- Use semicolons in JavaScript +- Use single quotes for strings unless template literals are needed + +### File Naming +- Use kebab-case for markdown files (e.g., `mein-blog-post.md`) +- Use snake_case for JavaScript utility modules (e.g., `post_url.js`) +- Use kebab-case for CSS files + +## Don't +- Don't modify generated files in `_site/` directory +- Don't use ES modules syntax (use CommonJS) +- Don't add dependencies without considering build size +- Don't bypass TailwindCSS for custom CSS unless necessary +- Don't commit node_modules or _site directories diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 816f766254..10a187ce5e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,12 @@ version: 2 updates: - package-ecosystem: npm - directory: "/" + directory: / + schedule: + interval: monthly + open-pull-requests-limit: 0 + - package-ecosystem: github-actions + directory: / schedule: interval: monthly open-pull-requests-limit: 0 diff --git a/.github/workflows/build-prs-to-main.yml b/.github/workflows/build-prs-to-main.yml index d2f3a9f380..1ab3fc1b6d 100644 --- a/.github/workflows/build-prs-to-main.yml +++ b/.github/workflows/build-prs-to-main.yml @@ -1,10 +1,14 @@ name: Build code on: + workflow_dispatch: pull_request: branches: - main +permissions: + contents: read + jobs: pr-build: runs-on: ubuntu-22.04 @@ -12,13 +16,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20 - - name: Install dependencies and build + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linting and formatting run: | - npm ci npm run lint npm run prettier - npm run build + + - name: Build site + run: npm run build diff --git a/.github/workflows/deploy-page.yml b/.github/workflows/deploy-page.yml index 9a64ded9da..f78a725019 100644 --- a/.github/workflows/deploy-page.yml +++ b/.github/workflows/deploy-page.yml @@ -8,20 +8,31 @@ on: jobs: github-pages: runs-on: ubuntu-22.04 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20 - - name: Install dependencies and build + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linting and formatting run: | - npm ci npm run lint npm run prettier - npm run build + + - name: Build site + run: npm run build + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: From 5dce85fe2ad69d638ea8e5a9e3766ca146bd0c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Ganzenm=C3=BCller?= Date: Wed, 29 Oct 2025 22:29:08 +0100 Subject: [PATCH 2/2] prettier --- .github/workflows/build-prs-to-main.yml | 4 ++-- .github/workflows/deploy-page.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-prs-to-main.yml b/.github/workflows/build-prs-to-main.yml index 1ab3fc1b6d..a682fb136e 100644 --- a/.github/workflows/build-prs-to-main.yml +++ b/.github/workflows/build-prs-to-main.yml @@ -20,8 +20,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci diff --git a/.github/workflows/deploy-page.yml b/.github/workflows/deploy-page.yml index f78a725019..f40f2e75d3 100644 --- a/.github/workflows/deploy-page.yml +++ b/.github/workflows/deploy-page.yml @@ -19,8 +19,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci