Skip to content

Commit

Permalink
chore(home): add build pipeline for home (next.js)
Browse files Browse the repository at this point in the history
  • Loading branch information
mildronize committed May 7, 2024
1 parent 1d4a4a7 commit 4014d4d
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 11 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy-home.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy Home Site

on: [push]

permissions:
contents: write

env:
pnpm_version: 8
node_version: 20

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- uses: actions/checkout@v4

- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: ${{ env.pnpm_version }}

- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm exec nx run home:build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/apps/home/.next # The folder the action should deploy.
1 change: 1 addition & 0 deletions apps/home/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const nextConfig = {
// See: https://github.com/gregberge/svgr
svgr: false,
},
output: 'export',
};

const plugins = [
Expand Down
6 changes: 0 additions & 6 deletions apps/home/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@
}
}
},
"export": {
"executor": "@nx/next:export",
"options": {
"buildTarget": "home:build:production"
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
Expand Down
100 changes: 95 additions & 5 deletions apps/nammatham/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,104 @@
"sourceRoot": "apps/nammatham",
"projectType": "application",
"targets": {
"docusaurus": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"dev": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus start"
],
"parallel": false,
"cwd": "apps/nammatham"
"commands": [
"docusaurus start"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"build": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus build"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"swizzle": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus swizzle"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"deploy": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus deploy"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"clear": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus clear"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"serve": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus serve"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"write-translations": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus write-translations"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"write-heading-ids": {
"executor": "nx:run-commands",
"options": {
"commands": [
"docusaurus write-heading-ids"
],
"parallel": false,
"cwd": "apps/nammatham"
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
"tsc"
],
"parallel": false,
"cwd": "apps/nammatham"
}
}
},
Expand Down

0 comments on commit 4014d4d

Please sign in to comment.