Skip to content

Commit 881e35e

Browse files
committed
refactoring, using s3
1 parent 0bba257 commit 881e35e

File tree

2 files changed

+63
-23
lines changed

2 files changed

+63
-23
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build STAC Browser UI
2+
description: Builds Voyager STAC Browser UI
3+
4+
inputs:
5+
upload:
6+
description: Where to upload artifacts
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Setup Node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 'lts/*'
16+
17+
- name: Install
18+
shell: bash
19+
run: npm install --legacy-peer-deps
20+
21+
- name: Build
22+
shell: bash
23+
run: npm run build -- --pathPrefix="/stac/" --historyMode=hash
24+
25+
- name: Delete dist/config.js
26+
shell: bash
27+
run: |
28+
if [ -f dist/config.js ]; then
29+
rm dist/config.js
30+
echo "config.js removed from dist/"
31+
else
32+
echo "config.js not found in dist/"
33+
fi
34+
35+
- name: Dist
36+
shell: bash
37+
if: ${{ inputs.upload == 'true' }}
38+
run: zip -r ../stac.zip .
39+
working-directory: ./dist
40+
41+
- name: Upload
42+
uses: voyagersearch/s3-upload-action@v8
43+
if: ${{ inputs.upload == 'true' }}
44+
with:
45+
folder: apps/stac
46+
name: STAC Browser
47+
arch: any
48+
include: stac.zip

.github/workflows/build.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
11
name: Build
2+
23
on:
4+
workflow_dispatch:
5+
36
push:
47
branches:
58
- v3.3.5_vg
9+
610
pull_request:
711
branches:
812
- v3.3.5_vg
9-
workflow_dispatch:
13+
14+
env:
15+
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
16+
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
1017

1118
jobs:
1219
build:
20+
name: Build
1321
runs-on: ubuntu-latest
1422
steps:
15-
- uses: actions/setup-node@v4
16-
with:
17-
node-version: 'lts/*'
18-
- uses: actions/checkout@v4
19-
- run: npm install
20-
- run: npm run build -- --pathPrefix="/stac/" --historyMode=hash
21-
- name: Delete dist/config.js
22-
run: |
23-
if [ -f dist/config.js ]; then
24-
rm dist/config.js
25-
echo "config.js removed from dist/"
26-
else
27-
echo "config.js not found in dist/"
28-
fi
29-
- name: Zip distribution folder
30-
run: zip -r dist.zip dist/
31-
- name: Upload dist.zip as artifact
32-
uses: actions/upload-artifact@v4
33-
with:
34-
name: dist-archive
35-
path: dist.zip
36-
23+
- name: Checkout
24+
uses: actions/checkout@v4
3725

26+
- name: Build
27+
uses: ./.github/actions/build-stac-browser
28+
with:
29+
upload: ${{ github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)