We’re now finally ready to share our map and data over the web using GitHub Pages. Since our map document html and data geojson are text-based data, GitHub is a good choice to store and manage them. GitHub does have hard limits when it comes to file storage, so be careful not to load anything too big, like cloud optimized geoTIFFs.
Before we move our map into the web, be sure that you’re not using your Mapbox default public access token. If you are, you risk others copying and using it for their own projects.
To Do
- Save your map in VS Code to verify everything looks good in your browser.
- Log into your GitHub account and go to your repository you set up for this workshop. You may need to click on your profile image in the top right and select **_Repositories_** to see your list.
- Drag and drop your
map.htmlandsnow_water_pumps.geojsonfile into your repository. You will be asked to add a commit message – add a short description. - In GitHub, click on Settings in the top menu bar.
- On the left side navigation, click Pages.
- Under Branch select main from the dropdown, assuming you have no other branches. Click Save
Now count to 30 and view your map online at the URL https://[your-username].github.io/[your-repository-name]/map.html
PREVIOUSGitHub Account