title: 使用Github Action将quartz发布到Netlify
tags: [Quartz, 工具箱]
date: 2024-01-27 22:05:41
date modified: 2024-01-27 22:14:30使用Github Action将quartz发布到Netlify
因为我的个博客使用的Netlify,这个服务给我的各方面印象都还不错,所以数字花园也索性一起发布在了这个上面。
结合之前发布11ty博客的方法,我同样通过Github Action完成了部署操作。
流程介绍:
yarn installname: Build and Test
on:
pull_request:
branches:
- v4
push:
branches:
- v4
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set Node.js 20.x
uses: actions/setup-node@master
with:
node-version: 20.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn prod` command
- name: Deploy to Netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
build_directory: public
with:
args: deploy --prod