Skip to content

Commit

Permalink
update GH Action & update gh pages config
Browse files Browse the repository at this point in the history
  • Loading branch information
petr-hajek committed Sep 30, 2024
1 parent d42e5bd commit 69eba83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 117 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- main
- maptiler

permissions:
contents: write
Expand All @@ -23,6 +23,8 @@ jobs:
yarn install --network-concurrency 1
cp public/config/gh-pages.js public/config/local.js
BASE_PATH=/maperture/ yarn build
env:
MAPTILER_API_KEY: ${{ secrets.MAPTILER_API_KEY }}
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
126 changes: 10 additions & 116 deletions public/config/gh-pages.js
Original file line number Diff line number Diff line change
@@ -1,126 +1,20 @@
const mapboxGlAccessToken =
'pk.eyJ1Ijoic3RhbWVuIiwiYSI6ImNreWM1emM2NjAyNTgyb25kc2o5ZG1iMmoifQ.o2QhFbe03ilcplg9sAhYZQ';

const maptilerApiKey = process.env.MAPTILER_API_KEY;

const stylePresets = [
{
id: 'mapbox-streets',
name: 'Mapbox Streets',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/streets-v11',
},
{
id: 'mapbox-outdoors',
name: 'Mapbox Outdoors',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/outdoors-v11',
},
{
id: 'mapbox-light',
name: 'Mapbox Light',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/light-v10',
},
{
id: 'mapbox-dark',
name: 'Mapbox Dark',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/dark-v10',
},
{
id: 'openstreetmap',
name: 'OpenStreetMap',
type: 'leaflet',
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
},
{
id: 'stamen-toner',
name: 'Stamen Toner',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-toner-lite',
name: 'Stamen Toner (Lite)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-toner-hybrid',
name: 'Stamen Toner (Hybrid)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner-hybrid/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-toner-labels',
name: 'Stamen Toner (Labels)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner-labels/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-toner-lines',
name: 'Stamen Toner (Lines)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner-lines/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-toner-background',
name: 'Stamen Toner (Background)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/toner-background/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-terrain',
name: 'Stamen Terrain',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-terrain-labels',
name: 'Stamen Terrain (Labels)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/terrain-labels/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-terrain-lines',
name: 'Stamen Terrain (Lines)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/terrain-lines/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
},
{
id: 'stamen-terrain-background',
name: 'Stamen Terrain (Background)',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
id: 'streets',
name: 'Streets',
type: 'maptiler-sdk',
url: 'https://api.maptiler.com/maps/streets-v2/style.json',
},
{
id: 'stamen-watercolor',
name: 'Stamen Watercolor',
type: 'leaflet',
url: 'https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png',
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
id: 'outdoor',
name: 'Outdoor',
type: 'maptiler-sdk',
url: 'https://api.maptiler.com/maps/outdoor-v2/style.json',
},
];

Expand Down

0 comments on commit 69eba83

Please sign in to comment.