-
Notifications
You must be signed in to change notification settings - Fork 27
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 #80 from diverta/nuxt3
Nuxt3
- Loading branch information
Showing
121 changed files
with
14,094 additions
and
42,496 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
BASE_URL=https://dev-nuxt-auth.a.kuroco.app |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,36 +1,105 @@ | ||
name: Build and Deploy | ||
name: Build and deploy to Kuroco front | ||
on: | ||
push: | ||
branches: | ||
- main | ||
issue_comment: | ||
types: [created, edited] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
# for Pull Request (exclude merged) | ||
pullreq_build: | ||
name: Build(pullreq) | ||
if: (github.repository == 'diverta/front_nuxt_auth' && github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/kuroco stage') && github.event.issue.pull_request != null) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Get branch name and sha" | ||
id: get_branch | ||
run: | | ||
PR=$(curl -H "X-Kuroco-Auth: token 79a0dac07eb8af664820afa615e28575" https://dev-nuxt-auth.a.kuroco.app/direct/menu/github/?pr=${{ github.event.issue.pull_request.url }}) | ||
echo "branch=$(echo $PR | jq -r '.ref')" >> $GITHUB_OUTPUT | ||
echo "sha=$(echo $PR | jq -r '.sha')" >> $GITHUB_OUTPUT | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.get_branch.outputs.branch }} | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16.x' | ||
node-version: '18.x' | ||
- name: CI Cache | ||
uses: actions/cache@v4 | ||
id: node_modules_cache_id | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref_name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }} | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
|
||
- name: Generate | ||
run: npm run generate | ||
- name: Zip artifact for upload | ||
run: cd ./.output/public && zip ../../dist.zip . -r | ||
- name: Archive Production Artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.get_branch.outputs.sha }}-${{ github.run_id }} | ||
path: dist.zip | ||
retention-days: 1 | ||
- name: Wait for Artifact download | ||
run: sleep 15 | ||
- name: Webhook | ||
uses: diverta/workflow-webhook@v3 | ||
env: | ||
webhook_url: "https://dev-nuxt-auth.a.kuroco.app/direct/menu/github/" | ||
webhook_secret: "79a0dac07eb8af664820afa615e28575" | ||
data: '{"single_zip":"1","domain":"dev-nuxt-auth.g.kuroco-front.app","pr":"${{ github.event.issue.pull_request.url }}", "repository":"${{ github.repository }}", "run_id":"${{ github.run_id }}", "hash":"${{ steps.get_branch.outputs.sha }}"}' | ||
|
||
#for Push | ||
pushed_build: | ||
name: Build(pushed) | ||
if: (github.repository == 'diverta/front_nuxt_auth' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- name: CI Cache | ||
uses: actions/cache@v4 | ||
id: node_modules_cache_id | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref_name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }} | ||
run: npm ci | ||
|
||
- name: Generate | ||
run: npm run generate | ||
- name: Zip artifact for upload | ||
run: cd ./.output/public && zip ../../dist.zip . -r | ||
- name: Archive Production Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.sha }}-${{ github.run_id }} | ||
path: dist | ||
path: dist.zip | ||
retention-days: 7 | ||
- name: Webhook | ||
uses: distributhor/workflow-webhook@v1 | ||
uses: diverta/workflow-webhook@v3 | ||
env: | ||
webhook_url: "https://dev-nuxt-auth.a.kuroco.app/direct/menu/github/" | ||
webhook_secret: "79a0dac07eb8af664820afa615e28575" | ||
data: '{"domain":"dev-nuxt-auth.g.kuroco-front.app", "repository":"${{ github.repository }}", "run_id":"${{ github.run_id }}", "hash":"${{ github.sha }}"}' | ||
|
||
data: '{"single_zip":"1","domain":"dev-nuxt-auth.g.kuroco-front.app", "repository":"${{ github.repository }}", "run_id":"${{ github.run_id }}", "hash":"${{ github.sha }}"}' |
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 |
---|---|---|
@@ -1,90 +1,24 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Node template | ||
# Logs | ||
/logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
|
||
# Nuxt generate | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
# IDE / Editor | ||
.idea | ||
# Node dependencies | ||
node_modules | ||
|
||
# Service worker | ||
sw.* | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# macOS | ||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Vim swap files | ||
*.swp | ||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example |
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 @@ | ||
npx lint-staged |
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 @@ | ||
21.7.1 |
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,7 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 200, | ||
"tabWidth": 4 | ||
} |
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,8 @@ | ||
{ | ||
"recommendations": [ | ||
"vue.volar", | ||
"dbaeumer.vscode-eslint", | ||
"stylelint.vscode-stylelint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
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,27 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"css.validate": true, | ||
"scss.validate": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[css,scss]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.stylelint": "always" | ||
} | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.stylelint": "always" | ||
} | ||
}, | ||
"[vue]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.stylelint": "always" | ||
} | ||
}, | ||
"prettier.configPath": "./.prettierrc.json", | ||
"prettier.useEditorConfig": false, | ||
"eslint.experimental.useFlatConfig": true | ||
} |
Oops, something went wrong.