v9
Some checks failed
Gitea Actions Demo / build-and-deploy-to-local-server (push) Successful in 48s
Gitea Actions Demo / deploy-to-remote-server (push) Failing after 0s

This commit is contained in:
2025-06-10 20:46:48 +08:00
parent 4f283a03f7
commit d579a52a7f
2 changed files with 13 additions and 4 deletions

View File

@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
build-and-deploy:
build-and-deploy-to-local-server:
runs-on: ubuntu-latest
env:
HUGO_VERSION: '0.147.5'
@ -22,9 +22,18 @@ jobs:
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- name: Build with Hugo
run: hugo
- name: Deploy
- name: Local Deploy
run: |
rm -rf /workspace/html/blog
mkdir -p /workspace/html/blog
cp -r public/* /workspace/html/blog/
- run: echo "🍏 This job's status is ${{ job.status }}."
deploy-to-remote-server:
needs: build-and-deploy-to-local-server
runs-on: mac
steps:
- name: Deploy to remote server
run: |
ssh root@1970666.xyz "rm -rf /root/docker/docker-nginx/html/blog"
scp -r /Users/konjacpotato/Workspace/docker/docker-nginx/html/blog root@1970666.xyz:/root/docker/docker-nginx/html/

View File

@ -1,4 +1,4 @@
baseURL: https://example.org/
baseURL: https://1970666.xyz/
languageCode: zh-cn
title: 魔芋土豆
theme: ["PaperMod"]