-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (37 loc) · 1.13 KB
/
copy-build-to-d2-ci.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
name: Copy build to d2-ci
on:
push:
branches-ignore:
- master
- next
- next-major
- alpha
- beta
- '[0-9]+.x'
- '[0-9]+.x.x'
- '[0-9]+.[0-9]+.x'
env:
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
jobs:
copy-to-d2-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{env.GH_TOKEN}}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build package
run: yarn build
- name: Pack and unpack the build to a directory named 'package'
run: yarn pack --filename output.tgz && tar -xzf output.tgz
- name: Copy package to d2-ci
uses: dhis2/deploy-build@master
with:
build-dir: package
github-token: ${{env.GH_TOKEN}}