mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 11:32:30 -06:00
added build and test actions
This commit is contained in:
parent
0caa9b899e
commit
051c303e6c
2 changed files with 79 additions and 0 deletions
54
.github/workflows/build.yml
vendored
Normal file
54
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
name: Build Theme
|
||||||
|
|
||||||
|
on: [pull_request_target]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: "${{ github.head_ref }}"
|
||||||
|
- name: Install dependencies and Build Theme
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run assets
|
||||||
|
- name: Commit and push Chart.js changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
branch: "${{ github.head_ref }}"
|
||||||
|
push_options: "--dry-run"
|
||||||
|
file_pattern: "assets/lib/chart/*"
|
||||||
|
commit_message: "📦 Update packaged ChartJS"
|
||||||
|
- name: Commit Fuse changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
branch: "${{ github.head_ref }}"
|
||||||
|
push_options: "--dry-run"
|
||||||
|
file_pattern: "assets/lib/fuse/*"
|
||||||
|
commit_message: "📦 Update packaged FuseJS"
|
||||||
|
- name: Commit KaTeX changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
branch: "${{ github.head_ref }}"
|
||||||
|
push_options: "--dry-run"
|
||||||
|
file_pattern: "assets/lib/katex/*"
|
||||||
|
commit_message: "📦 Update packaged KaTeX"
|
||||||
|
- name: Commit Mermaid changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
branch: "${{ github.head_ref }}"
|
||||||
|
push_options: "--dry-run"
|
||||||
|
file_pattern: "assets/lib/mermaid/*"
|
||||||
|
commit_message: "📦 Update packaged Mermaid"
|
||||||
|
- run: npm run build
|
||||||
|
- name: Commit CSS changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
branch: "${{ github.head_ref }}"
|
||||||
|
push_options: "--dry-run"
|
||||||
|
file_pattern: "assets/css/compiled/main.css"
|
||||||
|
commit_message: "💄 Rebuild CSS"
|
||||||
|
- run: git push
|
25
.github/workflows/test.yml
vendored
Normal file
25
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: Test Build
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Example Site
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: "latest"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ./exampleSite
|
||||||
|
run: hugo --minify --themesDir ../.. --baseURL https://nunocoracao.github.io/blowfish/
|
Loading…
Reference in a new issue