Created
April 26, 2023 14:23
-
-
Save steezeburger/0c20765ebabe3db57c7157ecab0fb4f2 to your computer and use it in GitHub Desktop.
Quick and dirty "deployment" of static files to gh-pages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# This script was created to make it super easy to use the simplest gh-pages settings, | |
# which is basically just static files in the docs/ directory on the main branch. | |
# | |
# 1) copies CNAME to a temp location | |
# 2) builds some static files | |
# 3) copies static files to docs/ dir | |
# NOTE - replace the following with a command or script that builds your site's static files | |
npm run build | |
# copy CNAME to tmp file. this file is used by github for custom domain names. | |
cp docs/CNAME /tmp/CNAME | |
# delete existing contest of docs | |
rm -rf docs/* | |
# NOTE - may need to edit the following command. copy build files to docs/ | |
cp -r build/* docs/ | |
# copy CNAME file back to docs/ | |
cp /tmp/CNAME docs/CNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment