init: init commit, build
This commit is contained in:
42
.github/workflows/build.yaml
vendored
Normal file
42
.github/workflows/build.yaml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Build and Deploy Quartz
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.head_commit.message, 'build')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-modules-
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build Quartz site
|
||||
run: npx quartz build --bundleInfo
|
||||
|
||||
- name: Deploy to FTP
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.0
|
||||
with:
|
||||
server: ${{ vars.FTP_SERVER }}
|
||||
username: ${{ vars.FTP_USER }}
|
||||
password: ${{ vars.FTP_PASSWORD }}
|
||||
local-dir: public/
|
||||
server-dir: /codenotes/
|
||||
Reference in New Issue
Block a user