Skip to content

Commit

Permalink
Latest updated (#1)
Browse files Browse the repository at this point in the history
* Latest updated

* Create prod.yml

* setup cicd and dynamic deployment

* updated package version

---------

Co-authored-by: ct-jahidhasan <[email protected]>
Co-authored-by: Harshad <[email protected]>
  • Loading branch information
3 people committed May 2, 2023
1 parent 12ff7b6 commit 89fe69b
Show file tree
Hide file tree
Showing 94 changed files with 37,102 additions and 18,971 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REACT_APP_VERSION = v2.0.0
GENERATE_SOURCEMAP = false
PUBLIC_URL = https://codedthemes.com/demos/admin-templates/materially/react/free
REACT_APP_BASE_NAME = /demos/admin-templates/materially/react/free
4 changes: 4 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REACT_APP_VERSION = v2.0.0
GENERATE_SOURCEMAP = false
PUBLIC_URL =
REACT_APP_BASE_NAME =
4 changes: 4 additions & 0 deletions .env.qa
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REACT_APP_VERSION = v2.0.0
GENERATE_SOURCEMAP = false
PUBLIC_URL = https://codedthemes.com/demos/admin-templates/materially/react/stage/free
REACT_APP_BASE_NAME = demos/admin-templates/materially/react/stage/free
89 changes: 89 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": [
"prettier",
"plugin:react/jsx-runtime",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"eslint:recommended",
"plugin:react/recommended"
],
"settings": {
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use,
// default to "createReactClass"
"pragma": "React", // Pragma to use, default to "React"
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
"version": "detect", // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// It will default to "latest" and warn if missing, and to "detect" in the future
"flowVersion": "0.53" // Flow version
},
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src/"]
}
}
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"impliedStrict": true,
"jsx": true
},
"ecmaVersion": 12
},
"plugins": ["prettier", "react", "react-hooks"],
"rules": {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/react-in-jsx-scope": "off",
"no-undef": "off",
"react/display-name": "off",
"react/jsx-filename-extension": "off",
"no-param-reassign": "off",
"react/prop-types": 1,
"react/require-default-props": "off",
"react/no-array-index-key": "off",
"react/jsx-props-no-spreading": "off",
"react/forbid-prop-types": "off",
"import/order": "off",
"import/no-cycle": "off",
"no-console": "off",
"jsx-a11y/anchor-is-valid": "off",
"prefer-destructuring": "off",
"no-shadow": "off",
"import/no-named-as-default": "off",
"import/no-extraneous-dependencies": "off",
"jsx-a11y/no-autofocus": "off",
"no-restricted-imports": [
"error",
{
"patterns": ["@mui/*/*/*", "!@mui/material/test-utils/*"]
}
],
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": false
}
],
"prettier/prettier": [
"warn",
{
"bracketSpacing": true,
"printWidth": 140,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 2,
"useTabs": false,
"endOfLine": "auto"
}
]
}
}
39 changes: 39 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Node - SSH deploy

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- stage

jobs:
SFTP-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2

- name: Use Node.js 18
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: 🔨 Build Project
run: |
npm install --legacy-peer-deps
npm run build
- name: 📂 Deploy to Server
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
# ARGS: "-rltgoDzvO --delete"
SOURCE: 'build/'
REMOTE_HOST: 217.21.92.35
REMOTE_USER: u778408432
REMOTE_PORT: '65002'
TARGET: domains/codedthemes.com/public_html/demos/admin-templates/materially/react/free/stage
EXCLUDE: '/dist/, /node_modules/'
39 changes: 39 additions & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Node - SSH deploy

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- stage

jobs:
SFTP-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2

- name: Use Node.js 18
uses: actions/setup-node@v2-beta
with:
node-version: '18'

- name: 🔨 Build Project
run: |
npm install --legacy-peer-deps
npm run build-stage
- name: 📂 Deploy to Server
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
# ARGS: "-rltgoDzvO --delete"
SOURCE: 'build/'
REMOTE_HOST: 217.21.92.35
REMOTE_USER: u778408432
REMOTE_PORT: '65002'
TARGET: domains/codedthemes.com/public_html/demos/admin-templates/materially/react/free/stage
EXCLUDE: '/dist/, /node_modules/'
13 changes: 7 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"bracketSpacing": true,
"printWidth": 140,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 4,
"useTabs": false
"bracketSpacing": true,
"printWidth": 140,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 2,
"useTabs": false,
"endOfLine": "auto"
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is material design template created based on materially structure
# Getting Started

1. Installation process
- run 'npm install'
- start dev server run 'npm run start'
- run 'npm install'
- start dev server run 'npm run start'
2. Deployment process
- Goto full-version directory and open package.json. Update homepage URL to the production URL
- Goto full-version directory and run 'npm run build'
- Goto full-version directory and open package.json. Update homepage URL to the production URL
- Goto full-version directory and run 'npm run build'
29 changes: 29 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const webpack = require('webpack');
const WorkBoxPlugin = require('workbox-webpack-plugin');

module.exports = function override(config) {
config.resolve.fallback = {
process: require.resolve('process/browser'),
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
util: require.resolve('util'),
buffer: require.resolve('buffer')
};

// https://stackoverflow.com/questions/69135310/workaround-for-cache-size-limit-in-create-react-app-pwa-service-worker
config.plugins.forEach((plugin) => {
if (plugin instanceof WorkBoxPlugin.InjectManifest) {
plugin.config.maximumFileSizeToCacheInBytes = 50 * 1024 * 1024;
}
});

config.plugins = [
...config.plugins,
new webpack.ProvidePlugin({
process: 'process/browser.js',
Buffer: ['buffer', 'Buffer']
})
];

return config;
};
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"baseUrl": "src"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit 89fe69b

Please sign in to comment.