-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (46 loc) · 1.42 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release build
on:
release:
types: [published]
env:
PUBLIC_MINIO_ENDPOINT: minio.api.dsek.se
PUBLIC_MINIO_PORT: 443
PUBLIC_MINIO_USE_SSL: true
PUBLIC_BUCKETS_DOCUMENTS: documents
PUBLIC_BUCKETS_FILES: files
PUBLIC_BUCKETS_MEMBERS: members
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# fetch-tags: true # This should be enough, see https://github.com/actions/checkout/issues/1471
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Use Node.js latest LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: "pnpm"
- run: pnpm i
- run: pnpm run build
- uses: montudor/action-zip@v1
with:
args: zip -qq -r build.zip build src/database/prisma/schema.prisma \
src/database/schema.zmodel \
src/database/prisma/migrations \
src/routes/api/openapi.json/openapi.json \
prod/ecosystem.config.cjs \
prod/server.js \
package.json pnpm-lock.yaml patches
- uses: softprops/action-gh-release@v2
with:
files: build.zip
- shell: bash
env:
JENKINS_DEPLOY_TOKEN: ${{ secrets.JENKINS_DEPLOY_TRIGGER }}
run: |
curl -L "jenkins.dsek.se/buildByToken/build?job=Deploy_web&token=$JENKINS_DEPLOY_TOKEN"