You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BRANCH_PREVIEW_GUIDE.md
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,24 +92,24 @@ Open the preview with URL parameters to specify which branches to compare:
92
92
93
93
### Overview
94
94
95
-
The deployment system uses GitHub Actions to deploy the `preview-infra` branch to `gh-pages`. The `deploy-preview.yml` workflow simply copies the already-synced branches and HTML files to GitHub Pages.
95
+
The deployment system uses GitHub Actions to deploy the `preview-infra` branch to `gh-pages`. The `deploy-preview.yml` workflow is **automatically triggered** whenever you push to the `preview-infra` branch.
96
96
97
97
**The workflow**:
98
98
1. Checks out the `preview-infra` branch
99
99
2. Copies `index.html` and `viewer.html` to the deployment folder
100
100
3. Copies the entire `staging/` directory (which contains all synced branches)
101
101
4. Deploys everything to the `gh-pages` branch
102
102
103
-
**Important**: The workflow does NOT build branches. You must build and sync branches locally using `npm run preview-sync` before deploying.
103
+
**Important**: The workflow does NOT build branches. You must build and sync branches locally using `npm run preview-sync` before pushing.
104
104
105
-
### Workflow: Build → Sync → Deploy
105
+
### Workflow: Build → Sync → Push → View
106
106
107
107
1.**Build branches locally** (in `maplibre-gl-js`):
108
108
```bash
109
109
# Build main
110
110
git checkout main
111
111
npm run build-dev && npm run build-css
112
-
112
+
113
113
# Build your feature
114
114
git checkout my-feature
115
115
npm run build-dev && npm run build-css
@@ -119,10 +119,10 @@ The deployment system uses GitHub Actions to deploy the `preview-infra` branch t
119
119
```bash
120
120
cd ../maplibre-preview
121
121
git checkout preview-infra
122
-
122
+
123
123
# Sync main
124
124
npm run preview-sync # while main is checked out in maplibre-gl-js
125
-
125
+
126
126
# Switch to feature branch in maplibre-gl-js, then:
127
127
npm run preview-sync # syncs the feature branch
128
128
```
@@ -134,12 +134,7 @@ The deployment system uses GitHub Actions to deploy the `preview-infra` branch t
134
134
git push fork preview-infra
135
135
```
136
136
137
-
4.**Deploy to GitHub Pages**:
138
-
- Go to your fork on GitHub and switch to the preview-
139
-
- Navigate to **Actions** → **Deploy Branch Preview**
140
-
- Click **Run workflow**
141
-
- (Optional) Add a commit message
142
-
- Click **Run workflow**
137
+
4.**Automatic Deployment**: GitHub Actions will detect the push to `preview-infra` and automatically deploy the updated previews to `gh-pages`. You can track progress in the **Actions** tab.
0 commit comments