Files
garden/.gitea/workflows/deploy.yaml
Eau 2a1fa7ec3f
All checks were successful
Deploy Quartz site to Pages / build (push) Successful in 1m13s
Update .gitea/workflows/deploy.yaml
2026-04-12 03:44:11 +00:00

82 lines
2.6 KiB
YAML

name: Deploy Quartz site to Pages
env:
VERSION_FRAGMENT: minor
on:
push:
branches:
- 'main'
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: actions/checkout@v6
id: get garden content
with:
fetch-depth: 0 # Fetch all history for git info
path: content
- run: git config --global user.name "Build Pipeline"
- run: git config --global user.email "noreply@example.com"
- name: get current version
run: echo "::set-env name=CURRENT_VERSION::$(cat version.txt)"
working-directory: content
- name: Increment Semantic Version
uses: christian-draeger/increment-semantic-version@1.2.3
id: bump_version
with:
current-version: ${{ env.CURRENT_VERSION }}
version-fragment: ${{ env.VERSION_FRAGMENT }}
- run: echo "${{ steps.bump_version.outputs.next-version }}" > version.txt
working-directory: content
- name: Read Current Version
run: echo "::set-env name=CURRENT_VERSION::$(cat version.txt)"
working-directory: content
- run: git add version.txt && git commit -m "${{ env.VERSION_FRAGMENT }} version increment [skip actions]"
working-directory: content
- uses: actions/checkout@v6
id: clone quartz repo
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: 'jackyzha0/quartz.git'
github-server-url: 'https://github.com/'
fetch-depth: 1
persist-credentials: false
token: ${{secrets.GH_PAT}}
ref: v4
path: quartz
- name: Overlay quartz configs
run: cp -fR content/.quartz/** quartz
- name: Copy the content
run: cp -fR content/** quartz/content
- name: Install Dependencies
run: npm ci
working-directory: quartz
- name: Cache Modules
id: cache-npm
uses: actions/cache@v5
with:
path: node_modules
key: ${{ runner.os }}-node_modules_quartz
- name: Build Quartz
run: npx quartz build
working-directory: quartz
- run: tar czf www.tar.gz -C quartz public
- uses: akkuman/gitea-release-action@v1
with:
tag_name: ${{env.CURRENT_VERSION}}
name: ${{env.CURRENT_VERSION}}
files: |-
www.tar.gz
token: ${{secrets.CI_ACCESS}}
- run: git push
working-directory: content