blog/.github/workflows/depoly.yml

41 lines
1 KiB
YAML
Raw Normal View History

2020-12-26 10:05:52 +00:00
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).
2023-08-23 12:50:23 +00:00
- uses: pnpm/action-setup@v2
name: Setup Pnpm
with:
version: 8
2020-12-26 10:05:52 +00:00
2023-08-23 12:50:23 +00:00
- name: Setup Node
uses: actions/setup-node@v3
2020-12-26 10:05:52 +00:00
with:
2023-08-23 12:50:23 +00:00
node-version: "18"
cache: pnpm
cache-dependency-path: '**/pnpm-lock.yaml'
2020-12-26 10:05:52 +00:00
2023-08-23 12:52:43 +00:00
- name: Install Dependencies
run: pnpm install
2020-12-26 10:05:52 +00:00
# Deploy hexo blog website.
- name: Deploy
id: deploy
uses: sma11black/hexo-action@v1.0.4
2020-12-26 10:05:52 +00:00
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 }}"