Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Failing after 2s
36 lines
767 B
YAML
36 lines
767 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
|
|
cd repo
|
|
echo "Listing repo directory:"
|
|
ls
|
|
echo "Listing themes directory:"
|
|
ls themes/
|
|
git checkout main
|
|
|
|
- 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/
|