Skip to content

Commit

Permalink
EMFXD-1211: Improve UI and add partnership image builder (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
michyaraque authored Jul 28, 2022
1 parent 77e5bb2 commit 01da89d
Show file tree
Hide file tree
Showing 89 changed files with 33,485 additions and 521 deletions.
19 changes: 19 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

protected_master_branch='master'
protected_development_branch='development'

if read local_ref local_sha remote_ref remote_sha; then
if [[ "$remote_ref" == *"protected_master_branch"* ]] || [[ "$remote_ref" == *"protected_development_branch"* ]]; then
echo -en "\033[1;33mYou're about to push to master, is that what you intended? [y|n] \033[0m"
echo -en "\033[1m"
read -n 1 -r < /dev/tty
echo -en "\033[0m"

echo
if echo $REPLY | grep -E '^[Yy]$' > /dev/null; then
exit 0 # push will execute
fi
exit 1 # push will not execute
fi
fi
20 changes: 20 additions & 0 deletions .github/workflows/amplify-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI Pr trigger
on:
pull_request:
branches:
- master
- development
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-3
AWS_DEFAULT_OUTPUT: json
steps:
- uses: actions/checkout@v2
- name: Branch name
run: echo running on branch ${{ github.event.pull_request.base.ref }}
- name: Deploy
run: ./scripts/amplify-deploy.sh dv3y8kw3qscv8 ${{ github.event.pull_request.base.ref }}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

*.lock

# dependencies
/node_modules
/.pnp
Expand All @@ -26,3 +24,7 @@ yarn-error.log*

#next js
.next
out

#intellij
.idea/**
46 changes: 46 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/** @type {import('next').NextConfig} */
module.exports = {
async headers() {
return [
{
source: "/:path*{/fonts}?",
headers: [
{
key: "Cache-Control",
value: "public,max-age=31536000,immutable",
},
],
},
{
source: "/:path*{/img}?",
headers: [
{
key: "Cache-Control",
value: "public,max-age=31536000,immutable",
},
],
},
];
},
webpack: function (config) {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
})
return config
},
images: {
minimumCacheTTL: 86400,
},
eslint: {
ignoreDuringBuilds: true
},
/* i18n: {
locales: ['es', 'en'],
defaultLocale: 'en',
localeDetection: true,
}, */
trailingSlash: true,
reactStrictMode: true,
};

Loading

0 comments on commit 01da89d

Please sign in to comment.