mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-28 07:14:05 -06:00
✨ .github/workflows/: move workflows
This commit is contained in:
parent
83cf7a9b94
commit
381b615001
60
.github/workflows/deploy.yaml
vendored
Normal file
60
.github/workflows/deploy.yaml
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
name: Deploy Quartz site to GitHub Pages
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for git info
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
- name: Build Quartz
|
||||
run: npx quartz build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: public
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
if: github.actor == 'jyje'
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
auto-approve:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
steps:
|
||||
- uses: hmarr/auto-approve-action@v4
|
||||
with:
|
||||
review-message: "Auto approved automated PR"
|
||||
12
.github/workflows/utterances.yaml
vendored
Normal file
12
.github/workflows/utterances.yaml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
name: Control utterances issue
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
jobs:
|
||||
close-issue:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close Issue
|
||||
if: github.event.issue.user.login == 'utterances-bot'
|
||||
uses: peter-evans/close-issue@v3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user