Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7e4dbbc
Create GitHub Actions pipeline for build and deploy
SebastianSchuetze Feb 16, 2025
4633ce2
build: changed branch to trigger from
SebastianSchuetze Feb 16, 2025
6e3222b
build: update node engine requirement to >=22.0.0
Mar 12, 2025
3d7638e
build: update GitHub Actions workflow to use pnpm for dependency mana…
Mar 13, 2025
a99e6d4
build: enhance GitHub Actions workflow to include pnpm setup
Mar 13, 2025
a83d445
build: simplify pnpm installation in GitHub Actions workflow
Mar 13, 2025
e2b8e91
build: add Super-linter to GitHub Actions workflow for code quality c…
Mar 13, 2025
97a66c4
build: set fetch-depth to 0 in deploy workflow for complete history
Mar 13, 2025
433c070
build: enable format on save in VSCode settings for improved code con…
Mar 13, 2025
4d67d32
build: upgrade actions/checkout to v4 in deploy workflow for improved…
Mar 13, 2025
a7b9c2a
build: update VSCode settings to enforce consistent indentation with …
Mar 13, 2025
ae3aa64
build: fix formatting issues in payload-types.ts and tsconfig.json
Mar 13, 2025
c9e6c84
build: enable TypeScript formatting in VSCode settings for improved c…
Mar 14, 2025
53dc4a2
build: remove super-linter step from deploy workflow and add linter w…
Mar 14, 2025
d854efb
build: update package dependencies for improved stability and perform…
Mar 15, 2025
9760613
build: update super-linter configuration to enable additional validat…
Mar 15, 2025
3234f33
chor: formattet pnpm-lock.yaml
Mar 15, 2025
efc85d0
build: update editorconfig and VSCode settings for improved formattin…
Mar 15, 2025
3ff7a7d
style: format code for improved readability and consistency
Mar 15, 2025
8507246
build: add husky and lint-staged for pre-commit linting
Mar 15, 2025
3e6730b
build: disable JavaScript Standard validation in super-linter configu…
Mar 15, 2025
063a6c7
build: remove push trigger from linter workflow
Mar 15, 2025
484a3be
build: add validation for natural language, TypeScript ES, and Markdo…
Mar 15, 2025
75323b4
build: update lint-staged and TypeScript configuration to ignore spec…
Mar 15, 2025
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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = null
charset = utf-8
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
20 changes: 20 additions & 0 deletions .github/super-linter.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DEFAULT_BRANCH=main
VALIDATE_ALL_CODEBASE=false
VALIDATE_ENV=false
VALIDATE_CHECKOV=false
VALIDATE_CSS=false
VALIDATE_DOCKERFILE_HADOLINT=false
VALIDATE_GITLEAKS=false
VALIDATE_HTML=false
VALIDATE_JAVASCRIPT=false
VALIDATE_JAVASCRIPT_ES=false
VALIDATE_JSCPD=false
VALIDATE_JSON=false
VALIDATE_PYTHON=false
VALIDATE_YAML=false
VALIDATE_JAVASCRIPT_STANDARD=false
VALIDATE_EDITORCONFIG=false
VALIDATE_GIT_COMMITLINT=false
VALIDATE_NATURAL_LANGUAGE=false
VALIDATE_TYPESCRIPT_ES=false
VALIDATE_MARKDOWN=false
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to Vercel

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
branches:
- main
- 'SebastianSchuetze/**'

jobs:
Deploy-Preview:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.0.0

- name: Install dependencies
run: pnpm install

- name: Install Vercel CLI
run: pnpm install --global vercel@canary

- name: Build Project Artifacts
run: |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

Deploy-Production:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Install Vercel CLI
run: npm install --global vercel@canary

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Lint

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main

permissions: {}

jobs:
build:
name: Lint
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Load super-linter configuration
# Use grep inverse matching to exclude eventual comments in the .env file
# because the GitHub Actions command to set environment variables doesn't
# support comments.
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
run: grep -v '^#' .github/super-linter.env >> "$GITHUB_ENV"

- name: Super-linter
uses: super-linter/super-linter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"typescript.format.enable": true,
"[properties]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Core features:
- [Website](#website)
- [Cache](#cache)
- [Development](#development-1)
- [Local development](#local-development)
- [Migrations](#migrations)
- [Local development](#local-development)
- [Migrations](#migrations)
- [Docker](#docker)
- [Interactive Sessions](#interactive-sessions)
- [Seed](#seed)
Expand Down Expand Up @@ -181,12 +181,14 @@ When running Payload with Docker Compose, you'll need an interactive terminal se

Instead of using `docker compose up`, run the following command each in a seperate terminal window to get an interactive session:

* Payload
- Payload

```bash
docker compose run --rm --service-ports payload
```

* Postgres
- Postgres

```bash
docker compose run --rm postgres
```
Expand Down
26 changes: 13 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ services:
- data:/var/lib/postgresql/data

pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4_container
depends_on:
- postgres
restart: always
ports:
- "8888:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
volumes:
- pgadmin-data:/var/lib/pgadmin
- ./pgservers.json:/pgadmin4/servers.json
image: dpage/pgadmin4
container_name: pgadmin4_container
depends_on:
- postgres
restart: always
ports:
- '8888:80'
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
volumes:
- pgadmin-data:/var/lib/pgadmin
- ./pgservers.json:/pgadmin4/servers.json

volumes:
data:
Expand Down
50 changes: 31 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint:fix": "cross-env NODE_OPTIONS=--no-deprecation next lint --fix",
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload",
"reinstall": "cross-env NODE_OPTIONS=--no-deprecation rm -rf node_modules && rm pnpm-lock.yaml && pnpm --ignore-workspace install",
"start": "cross-env NODE_OPTIONS=--no-deprecation next start"
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
"prepare": "husky"
},
"dependencies": {
"@payloadcms/db-postgres": "latest",
Expand All @@ -30,47 +31,48 @@
"@payloadcms/plugin-seo": "latest",
"@payloadcms/richtext-lexical": "latest",
"@payloadcms/ui": "latest",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"class-variance-authority": "^0.7.0",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-slot": "^1.1.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cross-env": "^7.0.3",
"geist": "^1.3.0",
"graphql": "^16.8.2",
"geist": "^1.3.1",
"graphql": "^16.10.0",
"lucide-react": "^0.378.0",
"next": "^15.1.5",
"next": "^15.2.2",
"next-sitemap": "^4.2.3",
"payload": "latest",
"payload-admin-bar": "^1.0.7",
"prism-react-renderer": "^2.3.1",
"prism-react-renderer": "^2.4.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hook-form": "7.45.4",
"sharp": "0.32.6",
"tailwind-merge": "^2.3.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@tailwindcss/typography": "^0.5.13",
"@types/escape-html": "^1.0.2",
"@eslint/eslintrc": "^3.3.0",
"@tailwindcss/typography": "^0.5.16",
"@types/escape-html": "^1.0.4",
"@types/node": "22.5.4",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3",
"autoprefixer": "^10.4.20",
"autoprefixer": "^10.4.21",
"copyfiles": "^2.4.1",
"eslint": "^9.16.0",
"eslint": "^9.22.0",
"eslint-config-next": "15.1.5",
"husky": "^9.1.7",
"lint-staged": "^15.5.0",
"postcss": "^8.5.3",
"prettier": "^3.4.2",
"prettier": "^3.5.3",
"tailwindcss": "^3.4.17",
"typescript": "5.7.3"
},
"engines": {
"node": "^18.20.2 || >=20.9.0",
"pnpm": "^9 || ^10"
"node": ">=22.0.0"
},
"pnpm": {
"onlyBuiltDependencies": [
Expand All @@ -79,5 +81,15 @@
"overrides": {
"esbuild@<=0.24.2": ">=0.25.0"
}
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"ts-standard": {
"ignore": [
"src/migrations",
"src/payload-types.ts",
"src/**/*.js"
]
}
}
Loading