liberty-hu/.forgejo/workflows/build.yml
SouthFox 50be56a2bd
All checks were successful
/ build-uberjar (push) Successful in 2m30s
/ trigger-redeploy (push) Successful in 10s
[ci] add trigger redeploy job
2024-02-07 22:33:45 +08:00

54 lines
1.5 KiB
YAML

on: [push]
jobs:
build-uberjar:
container:
image: docker.io/southfox09/cl-builder:latest
steps:
- uses: actions/checkout@v3
- name: Restore npm dependencies
uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ runner.os }}-nodejs-${{ hashFiles('**/package-lock.json') }}
- name: Restore lein project dependencies
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}
- run: npm install
- run: npm run postcss:release
- run: npm run shadow:release
- run: mkdir resources/public && cp -rf public/* resources/public
- run: lein uberjar
- name: Cache npm dependencies
id: cache-primes-save
uses: actions/cache/save@v4
with:
path: node_modules
key: ${{ runner.os }}-nodejs-${{ hashFiles('**/package-lock.json') }}
- name: Cache lein project dependencies
uses: actions/cache/save@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-clojure-${{ hashFiles('**/project.clj') }}
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: uberjar
path: target/*-standalone.jar
trigger-redeploy:
needs: [build-uberjar]
runs-on: docker
steps:
- uses: actions/webhook@master
with:
url: ${{ secrets.WEBHOOK_URL }}
body: '{ "run_number": ${{ env.GITHUB_RUN_NUMBER }} }'