Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Failing after 0s
31 lines
608 B
YAML
31 lines
608 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 $GITEA_SERVER_URL/$GITHUB_REPOSITORY.git .
|
|
git checkout $GITHUB_SHA
|
|
|
|
- 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/
|