Gitea Action auto deploy
Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Failing after 5m38s
Some checks failed
Build and Deploy Qingshuige / build-deploy (push) Failing after 5m38s
This commit is contained in:
32
.gitea/workflows/deploy.yml
Normal file
32
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
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: Install Hugo
|
||||||
|
run: |
|
||||||
|
HUGO_VERSION=0.155.1
|
||||||
|
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz
|
||||||
|
tar -xzf hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz
|
||||||
|
sudo mv hugo /usr/local/bin/
|
||||||
|
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/
|
||||||
Reference in New Issue
Block a user