diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 0da7e8d3..00000000 --- a/.drone.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -kind: pipeline -type: exec -name: blog 发布 - -steps: - - name: publish - commands: - - cp -rf public/* /www/wwwroot/caddy/html/blog-hexo/ - - echo all works done! \ No newline at end of file diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 00000000..504726fe --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build Project + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' # or specify the version you need + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: hexo clean + run: hexo cl + + - name: hexo generate + run: hexo g + + - name: build algolia search index + run: pnpm run search + + - name: move dist assets + run: cp -rf public/* /www/wwwroot/caddy/html/blog-hexo/ \ No newline at end of file