Skip to content

Commit

Permalink
chore: update workflows config (#20)
Browse files Browse the repository at this point in the history
### What this PR does?
更新 workflow 配置

```release-note
None
```
  • Loading branch information
guqing authored Jul 2, 2024
1 parent 5d18a15 commit 7dbc198
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 109 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CD

on:
release:
types:
- published

jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-cd.yaml@v1
secrets:
halo-username: ${{ secrets.HALO_USERNAME }}
halo-password: ${{ secrets.HALO_PASSWORD }}
permissions:
contents: write
with:
app-id: app-OoggD
ui-path: "assets"

15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1
with:
ui-path: "assets"
105 changes: 0 additions & 105 deletions .github/workflows/workflow.yaml

This file was deleted.

12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ node {
nodeProjectDir = file("${project.projectDir}/assets")
}

task buildFrontend(type: PnpmTask) {
tasks.register('installDepsForUI', PnpmTask) {
args = ['install']
}

tasks.register('buildFrontend', PnpmTask) {
args = ['build']
dependsOn('installDepsForUI')
}

build {
// build frontend before build
tasks.getByName('compileJava').dependsOn('buildFrontend')
tasks.named('build').configure {
dependsOn('buildFrontend')
}

halo {
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: plugin.halo.run/v1alpha1
kind: Plugin
metadata:
name: PluginLightGallery
annotations:
store.halo.run/app-id: app-OoggD
spec:
enabled: true
requires: ">=2.10.0"
Expand Down

0 comments on commit 7dbc198

Please sign in to comment.