-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from weaponsforge/dev
v1.0.0
- Loading branch information
Showing
73 changed files
with
10,545 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.gitignore | ||
node_modules | ||
npm-debug.log | ||
Dockerfile | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Deploy to Firebase Hosting | ||
|
||
# This workflow deploys the static-generated nextjs app to Firebase Hosting | ||
# Triggered by push to the "dev" branch | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
lint-export-client: | ||
name: Lint and Export client | ||
runs-on: ubuntu-latest | ||
env: | ||
NEXT_PUBLIC_BASE_PATH: '' | ||
NEXT_PUBLIC_FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_AUTHDOMAIN: ${{ secrets.FIREBASE_WEB_AUTHDOMAIN_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_PROJECT_ID: ${{ secrets.FIREBASE_WEB_PROJECT_ID_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_STORAGE_BUCKET: ${{ secrets.FIREBASE_WEB_STORAGE_BUCKET_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_WEB_MESSAGING_SENDER_ID_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_APP_ID: ${{ secrets.FIREBASE_WEB_APP_ID_DEV }} | ||
NEXT_PUBLIC_FIREBASE_WEB_MEASUREMENT_ID: ${{ secrets.FIREBASE_WEB_MEASUREMENT_ID_DEV }} | ||
NEXT_PUBLIC_MEDIA_BG1: ${{ secrets.NEXT_PUBLIC_MEDIA_BG1 }} | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Use NodeJS v18.14.2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.14.2 | ||
- name: Install Dependencies | ||
run: | | ||
cd client | ||
npm install | ||
- name: Lint | ||
run: | | ||
cd client | ||
npm run lint | ||
- name: Export static files | ||
run: | | ||
cd client | ||
npm run export | ||
mv out/404/index.html out/404.html | ||
- name: Archive Development Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dev-out | ||
path: | | ||
client/out | ||
client/.firebaserc | ||
client/firebase.json | ||
retention-days: 3 | ||
|
||
deploy-client: | ||
name: Deploy Client to Firebase Hosting | ||
needs: lint-export-client | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dev-out | ||
- name: Deploy to Firebase | ||
uses: w9jds/firebase-action@master | ||
with: | ||
args: deploy --only hosting:dev | ||
env: | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Lint Files | ||
|
||
# This workflow lints the client and server directories | ||
# And will trigger on push *any* branch | ||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
lint-client: | ||
name: Lint Client | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use NodeJS v18.14.2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.14.2 | ||
|
||
- name: Install Dependencies and Lint | ||
run: | | ||
cd client | ||
npm install | ||
npm run lint | ||
lint-server: | ||
name: Lint Server | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Use NodeJS v18.14.2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.14.2 | ||
- name: Install Dependencies and lint | ||
run: | | ||
cd server | ||
npm install | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Deploy to Production Environment | ||
|
||
# This workflow will trigger on any tag/release created on *any* branch | ||
# Make sure to create tags/releases only from the "master" branch for consistency | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
lint-client: | ||
name: Lint and Export client | ||
runs-on: ubuntu-latest | ||
env: | ||
NEXT_PUBLIC_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BASE_PATH }} | ||
BASE_API_URL: ${{ secrets.BASE_API_URL }} | ||
NEXT_PUBLIC_FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_AUTHDOMAIN: ${{ secrets.FIREBASE_WEB_AUTHDOMAIN_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_PROJECT_ID: ${{ secrets.FIREBASE_WEB_PROJECT_ID_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_STORAGE_BUCKET: ${{ secrets.FIREBASE_WEB_STORAGE_BUCKET_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_WEB_MESSAGING_SENDER_ID_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_APP_ID: ${{ secrets.FIREBASE_WEB_APP_ID_PROD }} | ||
NEXT_PUBLIC_FIREBASE_WEB_MEASUREMENT_ID: ${{ secrets.FIREBASE_WEB_MEASUREMENT_ID_PROD }} | ||
NEXT_PUBLIC_MEDIA_BG1: ${{ secrets.NEXT_PUBLIC_MEDIA_BG1 }} | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Use NodeJS v18.14.2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.14.2 | ||
- name: Install Dependencies | ||
run: | | ||
cd client | ||
npm install | ||
- name: Lint Client | ||
run: | | ||
cd client | ||
npm run lint | ||
- name: Export static files | ||
run: | | ||
cd client | ||
npm run export | ||
mv out/404/index.html out/404.html | ||
- name: Disable Jekyll | ||
run: | | ||
cd client | ||
touch out/.nojekyll | ||
- name: Archive Development Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: main-out | ||
path: client/out | ||
retention-days: 3 | ||
|
||
deploy-client: | ||
name: Deploy client to Github Pages | ||
needs: lint-client | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: main-out | ||
|
||
- name: List files for publish | ||
run: ls -l -a | ||
|
||
- name: Deploy to Github Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./ | ||
publish_branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.gitignore | ||
node_modules | ||
npm-debug.log | ||
Dockerfile | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
NEXT_PUBLIC_BASE_PATH='' | ||
NEXT_PUBLIC_FIREBASE_WEB_API_KEY=AIzaSyDIdds0QEYfS_GFbARrAU53AmvxH-HCcRU | ||
NEXT_PUBLIC_FIREBASE_WEB_AUTHDOMAIN=my-phonebook-dev.firebaseapp.com | ||
NEXT_PUBLIC_FIREBASE_WEB_PROJECT_ID=my-phonebook-dev | ||
NEXT_PUBLIC_FIREBASE_WEB_STORAGE_BUCKET=my-phonebook-dev.appspot.com | ||
NEXT_PUBLIC_FIREBASE_WEB_MESSAGING_SENDER_ID=240072530372 | ||
NEXT_PUBLIC_FIREBASE_WEB_APP_ID=1:240072530372:web:9bece433da7e2e56b4ec91 | ||
NEXT_PUBLIC_FIREBASE_WEB_MEASUREMENT_ID=G-MYW833GXV6 | ||
NEXT_PUBLIC_MEDIA_BG1=https://firebasestorage.googleapis.com/v0/b/my-phonebook-pro.appspot.com/o/media%2Fimages%2Fpexels-pixabay-101529.jpg?alt=media&token=24e8132a-8c2e-4c28-bad5-1ab35b82607e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": "next/core-web-vitals", | ||
"plugins": [ | ||
"eslint-plugin-react", "eslint-plugin-react-hooks" | ||
], | ||
"rules": { | ||
"indent": ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "never"], | ||
"no-unused-vars": "error", | ||
"no-undef": "error", | ||
"no-console": ["error", { "allow": ["error"] }] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"projects": { | ||
"default": "my-phonebook-dev" | ||
}, | ||
"targets": { | ||
"my-phonebook-dev": { | ||
"hosting": { | ||
"dev": [ | ||
"my-phonebook-dev" | ||
] | ||
} | ||
} | ||
}, | ||
"etags": {} | ||
} |
Oops, something went wrong.