Skip to content

Commit c88bc2c

Browse files
committed
Make files that need to be copied visible to git
1 parent 1d49255 commit c88bc2c

File tree

16 files changed

+178049
-15
lines changed

16 files changed

+178049
-15
lines changed

.github/workflows/deploy-preview.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
run: |
2929
# Copy everything to deploy directory
3030
mkdir -p deploy-out
31-
31+
3232
# Copy HTML files
3333
cp index.html deploy-out/
3434
cp viewer.html deploy-out/
35-
36-
# Copy staging directory with all branches
37-
cp -r staging deploy-out/
35+
36+
# Copy previews directory with all branches
37+
cp -r previews deploy-out/
3838
3939
- name: Deploy to GitHub Pages
4040
uses: JamesIves/github-pages-deploy-action@v4

BRANCH_PREVIEW_GUIDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ The preview system uses a clean two-file architecture:
88

99
- **`index.html`**: Main container with side-by-side layout and controls (Align, Synchronize, Zoom)
1010
- **`viewer.html`**: Individual map viewer loaded in iframes, one per branch
11-
- **Asset structure**: Built assets stored in `staging/previews/{branch}/dist/`
11+
- **Asset structure**: Built assets stored in `previews/{branch}/dist/`
1212

1313
### How It Works
1414

15-
1. Each branch's build artifacts are synced to `staging/previews/{branch}/dist/`
15+
1. Each branch's build artifacts are synced to `previews/{branch}/dist/`
1616
2. `index.html` loads two instances of `viewer.html` in iframes, passing branch names via URL parameters
1717
3. Each `viewer.html` loads its branch's MapLibre assets and renders a map
1818
4. The iframes communicate with the parent via `postMessage` for synchronization
@@ -60,8 +60,8 @@ Defined under `scripts` in `package.json`:
6060

6161
The server serves from the project root, with:
6262
- HTML files at root: `index.html`, `viewer.html`
63-
- Branch assets in: `staging/previews/{branch}/dist/`
64-
- Branch registry: `staging/previews/branches.json`
63+
- Branch assets in: `previews/{branch}/dist/`
64+
- Branch registry: `previews/branches.json`
6565

6666
---
6767

@@ -97,7 +97,7 @@ The deployment system uses GitHub Actions to deploy the `preview-infra` branch t
9797
**The workflow**:
9898
1. Checks out the `preview-infra` branch
9999
2. Copies `index.html` and `viewer.html` to the deployment folder
100-
3. Copies the entire `staging/` directory (which contains all synced branches)
100+
3. Copies the entire `previews/` directory (which contains all synced branches)
101101
4. Deploys everything to the `gh-pages` branch
102102

103103
**Important**: The workflow does NOT build branches. You must build and sync branches locally using `npm run preview-sync` before pushing.
@@ -178,8 +178,8 @@ Run `git branch` to see branch status symbols:
178178

179179
### Asset Loading Issues
180180
- **Local**: Ensure `npm run preview-local` is serving from the project root
181-
- **Remote**: Check that the workflow deployed to `staging/previews/{branch}/dist/`
182-
- **Paths**: Both `index.html` and `viewer.html` use relative paths starting with `./staging/previews/`
181+
- **Remote**: Check that the workflow deployed to `previews/{branch}/dist/`
182+
- **Paths**: Both `index.html` and `viewer.html` use relative paths starting with `./previews/`
183183

184184
### Sync Not Working
185185
- **Refresh the page**: The iframes need to be fully loaded before sync works

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
async function init() {
4444
let branches = ['main'];
4545
try {
46-
const resp = await fetch('./staging/previews/branches.json');
46+
const resp = await fetch('./previews/branches.json');
4747
if (resp.ok) branches = await resp.json();
4848
} catch (e) {}
4949

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
Copyright (c) 2023, MapLibre contributors
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
* Neither the name of MapLibre GL JS nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
30+
-------------------------------------------------------------------------------
31+
32+
Contains code from mapbox-gl-js v1.13 and earlier
33+
34+
Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
35+
36+
Copyright (c) 2020, Mapbox
37+
Redistribution and use in source and binary forms, with or without modification,
38+
are permitted provided that the following conditions are met:
39+
40+
* Redistributions of source code must retain the above copyright notice,
41+
this list of conditions and the following disclaimer.
42+
* Redistributions in binary form must reproduce the above copyright notice,
43+
this list of conditions and the following disclaimer in the documentation
44+
and/or other materials provided with the distribution.
45+
* Neither the name of Mapbox GL JS nor the names of its contributors
46+
may be used to endorse or promote products derived from this software
47+
without specific prior written permission.
48+
49+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
53+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
54+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
55+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
56+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
57+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
58+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
59+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60+
61+
62+
-------------------------------------------------------------------------------
63+
64+
Contains code from glfx.js
65+
66+
Copyright (C) 2011 by Evan Wallace
67+
68+
Permission is hereby granted, free of charge, to any person obtaining a copy
69+
of this software and associated documentation files (the "Software"), to deal
70+
in the Software without restriction, including without limitation the rights
71+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72+
copies of the Software, and to permit persons to whom the Software is
73+
furnished to do so, subject to the following conditions:
74+
75+
The above copyright notice and this permission notice shall be included in
76+
all copies or substantial portions of the Software.
77+
78+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
84+
THE SOFTWARE.
85+
86+
--------------------------------------------------------------------------------
87+
88+
Contains a portion of d3-color https://github.com/d3/d3-color
89+
90+
Copyright 2010-2016 Mike Bostock
91+
All rights reserved.
92+
93+
Redistribution and use in source and binary forms, with or without modification,
94+
are permitted provided that the following conditions are met:
95+
96+
* Redistributions of source code must retain the above copyright notice, this
97+
list of conditions and the following disclaimer.
98+
99+
* Redistributions in binary form must reproduce the above copyright notice,
100+
this list of conditions and the following disclaimer in the documentation
101+
and/or other materials provided with the distribution.
102+
103+
* Neither the name of the author nor the names of contributors may be used to
104+
endorse or promote products derived from this software without specific prior
105+
written permission.
106+
107+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
108+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
109+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
110+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
111+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
112+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
113+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
114+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
115+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
116+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)