diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d30772f4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,32 @@ +version: 2 +updates: + # Fetch and update latest `npm` packages + - package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "00:00" + open-pull-requests-limit: 10 + reviewers: + - terwer + assignees: + - terwer + commit-message: + prefix: fix + prefix-development: chore + include: scope + # Fetch and update latest `github-actions` pkgs + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: "00:00" + open-pull-requests-limit: 10 + reviewers: + - terwer + assignees: + - terwer + commit-message: + prefix: fix + prefix-development: chore + include: scope diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..461ac432 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: ci + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies and build for production + run: pnpm ci diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..0b1b116e --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,15 @@ +on: + push: + branches: + - main +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: node + package-name: release-please-action + changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]' diff --git a/README.md b/README.md index 884bb90f..24d5b274 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # zhi-blog -Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. +a blog based on siyuan-note api ## 规范 @@ -20,7 +20,7 @@ pnpm install Start the development server on http://localhost:3000 ```bash -pnpm dev -o +pnpm dev ``` ## Production diff --git a/package.json b/package.json index fe6471e7..4da4a24c 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,17 @@ { "name": "zhi-blog", - "version": "0.0.1", - "description": "a simple blog for siyuan-note", + "version": "1.1.2", + "description": "a blog based on siyuan-note api", "type": "module", "scripts": { + "dev": "pnpm build:css && nuxt dev", "watch:css": "stylus --watch blog.styl --out ./public/blog.css", "build": "pnpm build:css && pnpm build:js", "build:css": "stylus --compress blog.styl --out ./public/blog.css", "build:js": "nuxt build", - "dev": "pnpm build:css && nuxt dev", "generate": "pnpm build:css && nuxt generate", "generate:vercel": "pnpm build:css && BUILD_TYPE=vercel nuxt generate", + "ci": "pnpm inatsll && pnpm build", "preview": "nuxt preview", "postinstall": "nuxt prepare", "package:vercel": "bash package.sh", @@ -36,7 +37,7 @@ "vue-tsc": "^1.2.0" }, "dependencies": { - "zhi-common": "^1.0.7" + "zhi-sdk": "^1.0.12" }, "keywords": [ "zhi", diff --git a/pages/index.vue b/pages/index.vue index 7b0a5586..47cadb6a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -5,9 +5,10 @@