Deployment
Deploy Your Running Page in Various Platforms¶
Linux Server¶
Recommend System: Ubuntu 20.04 LTS
Requirements:
- Nginx or any other web servers;
- Python Environments (Anaconda is recommended);
- Nodejs (14) and Yarn (1.22.10 stable);
Steps:
- Point your domain to your server;
- Set your website root to
/public
folder; - Use Anaconda create a Python environment with any name you want;
- Follow the guide in
Installation
Part; - Done. Have fun with your Running Page!
Github Pages¶
-
If you are using a custom domain for GitHub Pages, open /.github/workflows/gh-pages.yml, change
fqdn
to the domain of your site; -
Modify
gatsby-config.js
, changepathPrefix
to your own URL path.
Example: If the repository's name is running_page
, then your Github Pages URL will be https://{yourname}.github.io/running_page , then the value will be /running_page
;
- Modify arguments in
run_data_sync.yml
; - Change
env
to your own app type and info; - Add your secret in repo Settings > Secrets (add only the ones you need); My secret is as follows
-
Add your GitHub secret and have the same name as the GitHub secret in your project;
-
Go to repository's
Actions -> Workflows -> All Workflows
, runData Sync
workflow first; -
After that done, choose
Publish GitHub Pages
from the left panel, clickRun workflow
. Make sure the workflow runs without errors, andgh-pages
branch is created; -
Go to repository's
Settings -> GitHub Pages -> Source
, chooseBranch: gh-pages
, clickSave
. Then all done. Enjoy running!
Vercel¶
-
Connect Vercel to your GitHub repo;
-
Import repo;
-
Awaiting completion of deployment;
- Done. Enjoy Running!
Cloudflare Pages¶
- Click
Create a project
inPages
to connect to your Repo; - After clicking
Begin setup
, modify Project'sBuild settings
; - Select
Framework preset
toGatsby
; - Scroll down, click
Environment variables
, input the variable below:Variable name =
PYTHON_VERSION
, Value =3.7
- Click
Save and Deploy
.