Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Failing after 1s
34 lines
690 B
YAML
34 lines
690 B
YAML
name: Build and Deploy Qingshuige
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
run: |
|
|
git clone https://gitea.qingshuige.ink/qingshuige-authors/qingshuige-hugo.git repo
|
|
chmod -R 777 .
|
|
cd repo
|
|
git checkout main
|
|
|
|
- name: Test Hugo
|
|
run: |
|
|
hugo version
|
|
|
|
- name: Build Hugo site
|
|
run: |
|
|
ls -R
|
|
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/
|