Skip to content

Create Home Assistant之——群晖Docker接入路由器(4).md #3195

Create Home Assistant之——群晖Docker接入路由器(4).md

Create Home Assistant之——群晖Docker接入路由器(4).md #3195

Workflow file for this run

name: Hexo Auto-Deploy
on:
push:
branches:
- master
jobs:
build:
name: Hexo Auto-Deploy by GitHub Actions
runs-on: ubuntu-latest
steps:
- name: 1. git checkout...
uses: actions/checkout@v4
- name: 2. setup nodejs...
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: 3. Cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: 4. Install hexo dependencies
run: |
npm install hexo-cli -g
npm install
- name: 5. hexo generate public files...
run: |
hexo clean
hexo generate
- name: 6. hexo deploy ...
env:
# Github 仓库
GITHUB_REPO: github.com/PGzxc/PGzxc.github.io.git
# Coding 仓库
CODING_REPO: e.coding.net/pgzxc/pgzxc/pgzxc.git
# 将编译后的博客文件推送到指定仓库
run: |
cd ./public && git init && git add .
git config --global user.name "PGzxc"
git config --global user.email "[email protected]"
git add .
git commit -m "GitHub Actions Auto Builder at $(date +'%Y-%m-%d %H:%M:%S')"
git push --force --quiet "https://${{ secrets.ACCESS_TOKEN }}@$GITHUB_REPO" master:hexo
# git push --force --quiet "https://JcwUpKlfjB:${{ secrets.CODING_TOKEN }}@$CODING_REPO" master:hexo