mirror of
https://github.com/apophenia-news/apophenia.news.git
synced 2026-03-16 19:01:02 +00:00
Feat: Build and auto-commit dist on push
This commit is contained in:
39
.github/workflows/build-dist.yml
vendored
Normal file
39
.github/workflows/build-dist.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Build and Commit dist
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.actor != 'github-actions[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build site
|
||||
run: npm run build
|
||||
|
||||
- name: Commit dist directory
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore(build): update dist [skip ci]"
|
||||
file_pattern: dist/**
|
||||
Reference in New Issue
Block a user