Skip to content

Commit

Permalink
Setup CI (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad authored Oct 17, 2023
1 parent e831952 commit d4f2cae
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 23 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Auto-assign issue or PR

on:
issues:
types: [opened]
pull_request:
types: [opened, edited, synchronize, reopened]
issues:
types: [opened]
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
auto-assign:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: 'Auto-assign issue or PR'
uses: pozil/auto-assign-issue@v1
with:
assignees: mauriciabad
auto-assign:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: 'Auto-assign issue or PR'
uses: pozil/auto-assign-issue@v1
with:
assignees: mauriciabad
59 changes: 59 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI
on: push

permissions:
contents: write

jobs:
lintfix:
name: Lint and fix
runs-on: ubuntu-latest
steps:
- name: 🚀 Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm

- name: 🏗️ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: 📦 Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false

- name: 📦 Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: 📦 Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 📦 Install dependencies
run: pnpm install

- name: 🔦 Run lint
run: pnpm lint --fix

- name: 🖌️ Run format
run: pnpm format

- name: 🍾 Commit & Push changes
uses: actions-js/push@master
with:
message: 'chore: Auto-fix lint errors'
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/drizzle
pnpm-lock.yaml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Source code for the app.
```

1. If you want to use a **local database**:

1. Install [docker](https://www.docker.com/products/docker-desktop/).
1. Run the database in another console:

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"name": "next-app-router-template",
"name": "descobreix-begur-app",
"version": "0.0.0",
"license": "MIT",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint": "SKIP_ENV_VALIDATION=true next lint",
"format": "prettier . --write",
"db:generate": "drizzle-kit generate:mysql",
"db:push": "drizzle-kit push:mysql",
Expand Down Expand Up @@ -58,5 +56,7 @@
"prettier-plugin-tailwindcss": "0.5.5",
"server-only": "0.0.1",
"tailwind-merge": "1.14.0"
}
},
"license": "GNU GENERAL PUBLIC LICENSE",
"packageManager": "pnpm@8.9.2"
}
2 changes: 1 addition & 1 deletion src/app/[locale]/(app)/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ProfilePage: FC<LocaleRouteParams> = () => {
return (
<>
<UnderConstruction />
<p className='text-center'>{t('content')}</p>
<p className="text-center">{t('content')}</p>
<LanguageSwitcher />
</>
)
Expand Down
5 changes: 1 addition & 4 deletions src/components/under-construction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import type { FC } from 'react'

export const UnderConstruction: FC = () => {
return (
<svg
className='m-full max-w-xs mx-auto xy-4'
viewBox='0 0 900 900'
>
<svg className="m-full xy-4 mx-auto max-w-xs" viewBox="0 0 900 900">
<linearGradient
id="a"
x1="343.956"
Expand Down

0 comments on commit d4f2cae

Please sign in to comment.