Skip to content

Commit

Permalink
migrated to include cms
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin2Shih committed Sep 25, 2024
1 parent e60d195 commit d3a377b
Show file tree
Hide file tree
Showing 87 changed files with 495 additions and 20,733 deletions.
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

7 changes: 0 additions & 7 deletions .env.example

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .eslintrc

This file was deleted.

44 changes: 44 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"prettier"
],
"plugins": ["prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"prettier/prettier": [
"error",
{
"bracketSpacing": true,
"tabWidth": 2,
"printWidth": 120,
"useTabs": false,
"trailingComma": "es5",
"endOfLine": "auto",
"semi": true,
"singleQuote": true
}
],
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"max-lines-per-function": "off",
"no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_*$",
"argsIgnorePattern": "^_*$",
"destructuredArrayIgnorePattern": "^_*$"
}
],
"block-spacing": 1,
"no-undef": "off"
}
}
45 changes: 18 additions & 27 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,38 @@ jobs:
name: production
url: ${{ vars.ENV_URL }}

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
HOST: 0.0.0.0
ADMIN_JWT_SECRET: ${{ secrets.ADMIN_JWT_SECRET }}
API_TOKEN_SALT: ${{ secrets.API_TOKEN_SALT }}
APP_KEYS: ${{ secrets.APP_KEYS }}
CLOUDINARY_KEY: ${{ secrets.CLOUDINARY_KEY }}
CLOUDINARY_NAME: ${{ secrets.CLOUDINARY_NAME }}
TRANSFER_TOKEN_SALT: ${{ secrets.TRANSFER_TOKEN_SALT }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
TOKEN_TRANSFER_SALT: ${{ secrets.TOKEN_TRANSFER_SALT }}
DATABASE_HOST: ${{ vars.DATABASE_HOST }}
DATABASE_NAME: ${{ vars.DATABASE_NAME }}
DATABASE_PORT: ${{ vars.DATABASE_PORT }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: '20.11.1'
node-version: '21.1.0'

- name: Install dependencies
run: npm install

- name: Install railway
run: npm install -g @railway/[email protected]

- name: Build Strapi
- name: Prebuild
run: npm run build
env:
MONGO_CONNECTION_STRING: ${{ secrets.MONGO_CONNECTION_STRING }}

- name: Deploy image to Railway
- name: Publish to Vercel
working-directory: ./runtime-environment
run: >
RAILWAY_TOKEN=${{ secrets.RAILWAY_TOKEN }}
railway up
--service "strapi"
-d
vercel
--token ${{ secrets.VERCEL_TOKEN }}
-n ${{ vars.VERCEL_PROJECT }}
--yes
--prod
--env MONGO_CONNECTION_STRING=${{ secrets.MONGO_CONNECTION_STRING }}
--env CLOUDINARY_NAME=${{ secrets.CLOUDINARY_NAME }}
--env CLOUDINARY_API_KEY=${{ secrets.CLOUDINARY_API_KEY }}
--env CLOUDINARY_API_SECRET=${{ secrets.CLOUDINARY_API_SECRET }}
--env JWT_SECRET=${{ secrets.JWT_SECRET }}
--env REVALIDATE_URL=${{ vars.REVALIDATE_URL }}
--build-env MONGO_CONNECTION_STRING=${{ secrets.MONGO_CONNECTION_STRING }}
- name: Success
run: echo "🚀 Deploy successful 🚀 "
128 changes: 23 additions & 105 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,114 +1,32 @@
############################
# OS X
############################
# dependencies
/node_modules

.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*


############################
# Linux
############################

*~


############################
# Windows
############################

Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp


############################
# Packages
############################
# runtime
/runtime-environment

*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
# production
/.next

# misc
.DS_Store
*.pem

############################
# Logs and databases
############################

.tmp
*.log
*.sql
*.sqlite
*.sqlite3


############################
# Misc.
############################

*#
ssl
.idea
nbproject
public/uploads/*
!public/uploads/.gitkeep

############################
# Node.js
############################
# debug
npm-debug.log*

lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
# local env files
.env
.env*.local

############################
# Tests
############################
# vercel
.vercel

coverage
# typescript
*.tsbuildinfo
next-env.d.ts

############################
# Strapi
############################
#
/.vscode/

.env
license.txt
exports
.strapi
dist
build
.strapi-updater.json
# Local Netlify folder
.netlify
57 changes: 0 additions & 57 deletions README.md

This file was deleted.

17 changes: 0 additions & 17 deletions config/admin.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/api.js

This file was deleted.

Loading

0 comments on commit d3a377b

Please sign in to comment.