mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
update workflows
This commit is contained in:
parent
ac5f363932
commit
a6f9d26c55
53
.github/workflows/deploy-pnpm.yml
vendored
Normal file
53
.github/workflows/deploy-pnpm.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Quartz - Deploy to GitHub Pages (pnpm)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
install:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for git info
|
||||
- uses: actions/setup-node@v4
|
||||
name: Setup Node
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
build:
|
||||
needs: install
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
run: npm i
|
||||
- name: Build Quartz Site
|
||||
run: npx quartz build
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
name: Upload artifact
|
||||
with:
|
||||
path: public
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v4
|
||||
id: deployment
|
||||
16
.github/workflows/deploy.yml
vendored
16
.github/workflows/deploy.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Quartz - Deploy to GitHub Pages
|
||||
name: Quartz - Deploy to GitHub Pages (npm)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@ -19,20 +19,18 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4 # v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for git info
|
||||
- uses: actions/setup-node@v3 # v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.11.0 # 18.14
|
||||
- name: PNPM Install
|
||||
uses: ./.github/actions/pnpm-install
|
||||
node-version: 18
|
||||
- name: Install Dependencies
|
||||
run: pnpm i # was npm i
|
||||
run: npm i
|
||||
- name: Build Quartz
|
||||
run: npx quartz build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3 # v2
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: public
|
||||
|
||||
@ -45,4 +43,4 @@ jobs:
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4 # v2
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user