This commit is contained in:
parent
ce783e6706
commit
c141e71d5f
35
.gitea/workflows/blog_hexo.yaml
Normal file
35
.gitea/workflows/blog_hexo.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
name: Hexo Blog CICD
|
||||
run-name: ${{ gitea.actor }} hexo blog dev-ops 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
DEPLOYED_DIR: /opt/1panel/apps/openresty/openresty/www/sites/hexoblog/index
|
||||
|
||||
jobs:
|
||||
Deploy-Hexo_Blog:
|
||||
name: Deploy blog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Build
|
||||
run: |
|
||||
npm install
|
||||
npm run clean
|
||||
npm run build
|
||||
- name: Deploy
|
||||
run: |
|
||||
echo "🔄 Deploying Hexo Blog..."
|
||||
cp -r public/* ${{ env.DEPLOYED_DIR }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
@ -647,7 +647,7 @@ aside:
|
||||
link: https://github.com/AnswerCoder
|
||||
card_announcement:
|
||||
enable: true
|
||||
content: 外面的声音太嘈杂,听自己的心就好
|
||||
content: ~~~
|
||||
card_recent_post:
|
||||
enable: true
|
||||
limit: 5 # if set 0 will show all
|
||||
|
||||
Loading…
Reference in New Issue
Block a user