diff --git a/deploy.py b/deploy.py new file mode 100644 index 0000000..df87798 --- /dev/null +++ b/deploy.py @@ -0,0 +1,19 @@ +import os + +# replace absolute path with relative path in index.html +print('Replacing absolute path with relative path in index.html...') +with open('index.html', 'r', encoding='utf-8') as f: + content = f.read() +content = content.replace('"/', '"') +with open('index.html', 'w', encoding='utf-8') as f: + f.write(content) +print('Done!') +print() + +# deploy to GitHub Pages +print('Deploying to GitHub Pages...') +os.system('git checkout deploy') +os.system('git add .') +os.system('git commit -m "replace absolute path with relative path in index.html"') +os.system('git push origin deploy') +print('Done!') diff --git a/index.html b/index.html index 200857a..b4ca3c6 100644 --- a/index.html +++ b/index.html @@ -12,12 +12,12 @@ - - - - - - + + + + + + - - - - - - + + + + + + \ No newline at end of file