Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Has been cancelled
29 lines
529 B
YAML
29 lines
529 B
YAML
name: Build and Deploy Qingshuige
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test Hugo
|
|
run: |
|
|
hugo version
|
|
|
|
- name: Build Hugo site
|
|
run: |
|
|
hugo --minify
|
|
|
|
- name: Deploy to local directory
|
|
run: |
|
|
TARGET_DIR=/www/wwwroot/qingshuige.ink
|
|
sudo mkdir -p $TARGET_DIR
|
|
sudo rsync -av --delete public/ $TARGET_DIR/
|