blog/.github/workflows/depoly.yml
2023-08-23 20:52:43 +08:00

40 lines
1 KiB
YAML

name: Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: A job to deploy blog.
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: true # Checkout private submodules(themes or something else).
- uses: pnpm/action-setup@v2
name: Setup Pnpm
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: pnpm
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Dependencies
run: pnpm install
# Deploy hexo blog website.
- name: Deploy
id: deploy
uses: sma11black/hexo-action@v1.0.4
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
commit_msg: ${{ github.event.head_commit.message }} # (or delete this input setting to use hexo default settings)
# Use the output from the `deploy` step(use for test action)
- name: Get the output
run: |
echo "${{ steps.deploy.outputs.notify }}"