Skip to content

Commit

Permalink
πŸͺ’ Merge #6 (staging ← dev): Initialize Next.js boilerplate. Add metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbakas authored Nov 30, 2023
2 parents 523cf2f + b24160a commit fb55cc5
Show file tree
Hide file tree
Showing 29 changed files with 6,230 additions and 5 deletions.
Empty file added .dockerignore
Empty file.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# # `deploy.yaml`
# client | Semantyk
#
# Created: Nov 29, 2023
# Modified: Nov 29, 2023
#
# Author(s): Semantyk Team
# Maintainer(s): Daniel Bakas <https://id.danielbakas.com>
#
# Copyright Β© Semantyk 2023. All rights reserved.
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

name: Deploy to Google App Engine

on:
push:
branches:
- main
- staging

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# 1. Checkout the Repository
- name: Repository Checkout
uses: actions/checkout@v4
# 2. Setup Google Cloud SDK
- name: Cloud SDK Configuration
uses: google-github-actions/setup-gcloud@v1
# 3. Authenticate with Google Cloud
- name: GCP Authentication
uses: google-github-actions/auth@v1
with:
credentials_json: ${{secrets.GCP_CREDENTIALS}}
# 4. Deploy to Google App Engine
# Deployment to 'main' service
- name: Deploy to Main Service
if: github.ref == 'refs/heads/main'
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --promote --version main
# Deployment to 'staging' service
- name: Deploy to Staging Service
if: github.ref == 'refs/heads/staging'
run: gcloud app deploy app.yaml --project ${{secrets.GCP_PROJECT_ID}} --no-promote --version staging
53 changes: 53 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# # `test.yaml`
# client | Semantyk
#
# Created: Nov 29, 2023
# Modified: Nov 29, 2023
#
# Author(s): Semantyk Team
# Maintainer(s): Daniel Bakas <https://id.danielbakas.com>
#
# Copyright Β© Semantyk 2023. All rights reserved.
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

name: Build and Test

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.10.0 ]
steps:
# 1. Checkout the Repository
- uses: actions/checkout@v4
name: 1. Repository Checkout
# 2. Setup pnpm
- uses: pnpm/action-setup@v2
name: 2. Setup pnpm
with:
version: 8
# 3. Setup Node.js
- uses: actions/setup-node@v4
name: 3. Setup Node.js (v${{ matrix.node-version }})
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
# 4. Install Dependencies
- run: pnpm install
name: 4. Install Dependencies
# 5. Build
- run: pnpm run build
name: 5. Build
# 6. Test
- run: pnpm test
name: 6. Test
179 changes: 176 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# Copyright Β© Semantyk 2023. All rights reserved.
# –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

# Created by https://www.toptal.com/developers/gitignore/api/git,webstorm+all
# Edit at https://www.toptal.com/developers/gitignore?templates=git,webstorm+all
# Created by https://www.toptal.com/developers/gitignore/api/git,node,macos,webstorm+all
# Edit at https://www.toptal.com/developers/gitignore?templates=git,node,macos,webstorm+all

### Git ###
# Created by git for backups. To disable backups in Git:
Expand All @@ -31,6 +31,179 @@
*_LOCAL_*.txt
*_REMOTE_*.txt

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### WebStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
Expand Down Expand Up @@ -119,4 +292,4 @@ fabric.properties
!.idea/codeStyles
!.idea/runConfigurations

# End of https://www.toptal.com/developers/gitignore/api/git,webstorm+all
# End of https://www.toptal.com/developers/gitignore/api/git,node,macos,webstorm+all
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Authors

### [client](https://client.github.semantyk.com) | [Semantyk](https://www.semantyk.com)

This file lists all individuals having contributed content to the project.

* **Created:** Nov 28, 2023
* **Modified:** Nov 28, 2023
* **Author(s):** [Semantyk Team](https://github.com/orgs/semantyk/people)
* **Maintainer(s):** [Daniel Bakas](https://id.danielbakas.com)

## Our Team

| Name | GitHub Username | Role | WebID | Mail |
|:-----------------------------------------------|:-------------------------------------------------------|:--------|:----------------------------------------------------------------------|:---------------------------------------------------------------|
| [**Daniel Bakas**](https://id.danielbakas.com) | <a href="https://github.danielbakas.com">`danielbakas` | Founder | <a href="https://id.danielbakas.com">`https://id.danielbakas.com`</a> | <a href="mailto:[email protected]">`[email protected]`</a> |

---
*Copyright Β© [Semantyk](https://www.semantyk.com/) 2023. All rights reserved.*
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# # `Dockerfile`
# client | Semantyk
#
# Created: Nov 30, 2023
# Modified: Nov 30, 2023
#
# Author(s): Semantyk Team
# Maintainer(s): Daniel Bakas <https://id.danielbakas.com>
#
# Copyright Β© Semantyk 2023. All rights reserved.
# ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

# Stage 1: Build the application
# Use Node.js Image
FROM node:alpine AS builder
# Install pnpm
RUN npm install -g pnpm
# Set the working directory
WORKDIR /app
# Copy package.json and other related files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install
# Copy the rest of your app's source code
COPY . .
# Build the Next.js app
RUN pnpm run build

# Stage 2: Production environment
# Use Node.js Image
FROM node:alpine
# Set the working directory
WORKDIR /usr/src/app
# Copy related files
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
# Expose port 3000
EXPOSE 3000
Loading

0 comments on commit fb55cc5

Please sign in to comment.