-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.08 KB
/
STACbrowser.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
# Deploy a STAC Browser website to github pages
name: STAC Browser
on: workflow_dispatch
env:
CATALOG_URL: "https://raw.githubusercontent.com/${{ github.repository }}/main/collection.json"
TILE_SOURCE_TEMPLATE: "https://api.cogeo.xyz/cog/tiles/{z}/{x}/{y}?url={ASSET_HREF}&expression=sqrt(b1)&rescale=0,1"
PATH_PREFIX: "/${{ github.event.repository.name }}/"
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout STAC Browser Source
uses: actions/checkout@v2
with:
repository: radiantearth/stac-browser
ref: v2.0.0
- name: Install STAC Browser
run: |
npm install .
- name: Build Website
run: |
npm run build -- --CATALOG_URL="${{ env.CATALOG_URL }}" \
--TILE_SOURCE_TEMPLATE="${{ env.TILE_SOURCE_TEMPLATE }}" \
--PATH_PREFIX="${{ env.PATH_PREFIX }}" \
--HISTORY_MODE=hash
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages