-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github pipeline for docs and tests added
- Loading branch information
1 parent
0be1acd
commit 2fbc01d
Showing
9 changed files
with
1,955 additions
and
165 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,68 @@ | ||
name: ci | ||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
name: vitest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: yarn install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install # will run `yarn install` command | ||
# dir: 'ivue' | ||
- name: vitest ivue | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: test # will run `yarn test` command | ||
# dir: 'ivue' | ||
docs-deploy: | ||
name: deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Setup git | ||
run: | | ||
git config user.name "Evgeny Kalashnikov" && git config user.email "[email protected]" | ||
- name: yarn install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install # will run `yarn install` command | ||
dir: 'docs' | ||
- name: deploy docs | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: deploy # will run `yarn deploy` command | ||
dir: 'docs' | ||
# docs-deploy: | ||
# name: Deploying to gh-pages | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Setup Node.js for use with actions | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# version: 12.x | ||
# - name: Checkout branch | ||
# uses: actions/checkout@v2 | ||
# | ||
# - name: Clean install dependencies | ||
# run: npm ci | ||
# | ||
# - name: Run deploy script | ||
# run: | | ||
# git config user.name "Evgeny Kalashnikov" && git config user.email "[email protected]" | ||
# | ||
# cmd: deploy |
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,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
/docs/.vitepress/cache |
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 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.vuejs.org/config/app-configs | ||
export default defineConfig({ | ||
themeConfig: { | ||
siteTitle: 'ivue' | ||
}, | ||
base: '/ivue/' | ||
}) |
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 @@ | ||
<script setup> | ||
|
||
const a = 'Coming soon' | ||
</script> | ||
# Coming soon | ||
|
||
|
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,24 @@ | ||
{ | ||
"name": "vitepress-project", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vitepress dev docs", | ||
"build": "vitepress build docs", | ||
"serve": "vitepress serve docs", | ||
"deploy": "node scripts/gh-pages-deploy.js" | ||
}, | ||
"devDependencies": { | ||
"cpy-cli": "^4.2.0", | ||
"execa": "^8.0.0", | ||
"vitepress": "^1.0.0", | ||
"vue": "3.2.44" | ||
}, | ||
"pnpm": { | ||
"peerDependencyRules": { | ||
"ignoreMissing": [ | ||
"@algolia/client-search" | ||
] | ||
} | ||
} | ||
} |
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,34 @@ | ||
import { execa } from 'execa' | ||
// import fs from "fs" | ||
|
||
(async () => { | ||
try { | ||
var datetime = new Date(); | ||
|
||
// this will save potential changes that might get lost if you didn't commit them | ||
await execa("git", ["stash", "push", "-m", "before deploy on " + datetime]); | ||
await execa("git", ["checkout", "--orphan", "gh-pages"]); | ||
|
||
console.log("Building...") | ||
|
||
await execa("yarn", ["run", "build"]) | ||
// Understand if it's dist or build folder | ||
const folderName = "docs/.vitepress/dist" | ||
await execa("git", ["--work-tree", folderName, "add", "--all"]) | ||
await execa("git", ["--work-tree", folderName, "commit", "-m", "gh-pages"]) | ||
|
||
console.log("Pushing to gh-pages...") | ||
|
||
await execa("git", ["push", "origin", "HEAD:gh-pages", "--force"]) | ||
await execa("rm", ["-r", folderName]) | ||
await execa("git", ["fetch"]) | ||
await execa("git", ["checkout", "-f", "main"]) | ||
await execa("git", ["branch", "-D", "gh-pages"]) | ||
|
||
console.log("Successfully deployed") | ||
} catch (e) { | ||
|
||
console.log(e.message) | ||
process.exit(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,20 @@ | ||
import { fileURLToPath, URL } from 'node:url' | ||
|
||
import { defineConfig } from 'vite' | ||
|
||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
|
||
resolve: { | ||
alias: { | ||
'@': fileURLToPath(new URL('./src', import.meta.url)) | ||
} | ||
}, | ||
server: { | ||
fs: { | ||
allow: ['..'] | ||
} | ||
}, | ||
|
||
}) |
Oops, something went wrong.