mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-08 19:12:51 +00:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
CI:
|
|
name: 🔨🚀 Build and deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 🚚 Checkout
|
|
uses: actions/checkout@v3
|
|
- name: 🐍 Use Python 3.x
|
|
uses: actions/setup-python@v3.1.4
|
|
with:
|
|
python-version: 3.x
|
|
cache: pip
|
|
- name: ⏬ Install Python dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 8
|
|
- name: 🐉 Use Node.js 18.16.x
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.16.x
|
|
cache: "pnpm"
|
|
- name: ⏬ Install Node dependencies
|
|
run: pnpm install
|
|
|
|
- name: 🔥 Optimize icon font
|
|
run: pnpm minify-icons
|
|
- name: 🔨 Build site
|
|
run: pnpm build
|
|
|
|
- name: 📦 Upload build artifacts
|
|
uses: actions/upload-artifact@v3.1.2
|
|
with:
|
|
name: build
|
|
path: build
|
|
- name: Disable jekyll
|
|
run: touch build/.nojekyll
|
|
- name: Custom domain
|
|
run: echo 'manager.charachorder.com' > build/CNAME
|
|
- run: git config user.name github-actions
|
|
- run: git config user.email github-actions@github.com
|
|
- run: git --work-tree build add --all
|
|
- run: git commit -m "Automatic Deploy action run by github-actions"
|
|
- run: git push origin HEAD:gh-pages --force
|