blog-hexo/.gitea/workflows/build.yml
mozzie 13cfa0c8a0
Some checks failed
Build Project / build (push) Failing after 1m4s
1
2024-06-04 13:45:46 +08:00

40 lines
828 B
YAML

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: '18' # or specify the version you need
- name: Install pnpm
run: npm i -g pnpm hexo
- 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: Scp files to remote server
run: |
scp -r public/* root@maxshader.com:/www/wwwroot/caddy/html/blog-hexo
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}