2023-04-28 23:12:07 +02:00
|
|
|
# Setup notes
|
|
|
|
|
2023-05-02 01:41:40 +02:00
|
|
|
## Setup
|
|
|
|
|
|
|
|
### Required Software
|
2023-04-29 00:51:28 +02:00
|
|
|
- bash terminal
|
2023-04-28 23:12:07 +02:00
|
|
|
- git
|
2023-05-02 19:10:22 +02:00
|
|
|
- hugo
|
|
|
|
- scp (or an alternative deployment method)
|
|
|
|
<!-- - ssh -->
|
2023-04-28 23:12:07 +02:00
|
|
|
|
2023-05-02 01:41:40 +02:00
|
|
|
### Windows setup
|
|
|
|
|
|
|
|
#### Install and run git-bash
|
|
|
|
|
|
|
|
1. Download and install Git for Windows
|
|
|
|
|
|
|
|
This can be downloaded from https://git-scm.com/download/win
|
|
|
|
|
|
|
|
Make sure to install "git-bash" during the setup process"
|
|
|
|
|
|
|
|
2. Open git-bash
|
|
|
|
|
|
|
|
search for git-bash from the start menu and open it
|
|
|
|
|
2023-05-02 02:56:50 +02:00
|
|
|
3. Add a name and email address (for identifying your commits)
|
|
|
|
|
|
|
|
git config --global user.email "you@example.com"
|
|
|
|
git config --global user.name "Your Name"
|
|
|
|
|
2023-05-02 18:35:23 +02:00
|
|
|
<!-- #### Set up SSH key
|
2023-05-02 01:41:40 +02:00
|
|
|
|
|
|
|
1. Set up SSH key for connecting to the server
|
|
|
|
|
|
|
|
```
|
2023-05-02 02:07:49 +02:00
|
|
|
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
2023-05-02 01:41:40 +02:00
|
|
|
eval "$(ssh-agent -s)"
|
2023-05-02 02:07:49 +02:00
|
|
|
ssh-add ~/.ssh/id_rsa
|
2023-05-02 01:41:40 +02:00
|
|
|
```
|
2023-04-28 23:12:07 +02:00
|
|
|
|
2023-05-02 01:41:40 +02:00
|
|
|
2. Copy your public key and add it to the Git repository account
|
2023-04-28 23:12:07 +02:00
|
|
|
|
2023-05-02 01:41:40 +02:00
|
|
|
To view the public key, type the following
|
|
|
|
|
|
|
|
```
|
2023-05-02 02:07:49 +02:00
|
|
|
cat ~/.ssh/id_rsa.pub
|
2023-05-02 01:41:40 +02:00
|
|
|
```
|
|
|
|
|
2023-05-02 02:23:14 +02:00
|
|
|
Then go the following page to add this output
|
|
|
|
|
2023-05-02 18:35:23 +02:00
|
|
|
https://git.disroot.org/user/settings/keys -->
|
2023-05-02 02:23:14 +02:00
|
|
|
|
2023-05-02 17:42:12 +02:00
|
|
|
#### Copy and Install the Project
|
|
|
|
|
|
|
|
1. Clone the repository
|
2023-05-02 01:41:40 +02:00
|
|
|
|
2023-05-02 17:41:44 +02:00
|
|
|
<!-- ```
|
2023-05-02 01:41:40 +02:00
|
|
|
mkdir project-folder
|
|
|
|
cd project-folder
|
|
|
|
git clone --recursive git@git.disroot.org:ace/hugo-demo.git
|
|
|
|
cd hugo-demo
|
2023-05-02 17:41:44 +02:00
|
|
|
``` -->
|
|
|
|
|
|
|
|
```
|
|
|
|
mkdir project-folder
|
|
|
|
cd project-folder
|
|
|
|
git clone --recursive https://git.disroot.org/ace/hugo-demo.git
|
|
|
|
cd hugo-demo
|
2023-05-02 01:41:40 +02:00
|
|
|
```
|
|
|
|
|
2023-05-02 17:42:12 +02:00
|
|
|
2. Install Hugo
|
2023-05-02 01:41:40 +02:00
|
|
|
|
|
|
|
```
|
2023-05-02 02:32:03 +02:00
|
|
|
./install/hugo/git-bash.sh
|
2023-05-02 01:41:40 +02:00
|
|
|
```
|
|
|
|
|
2023-05-02 17:42:12 +02:00
|
|
|
3. Run setup script
|
2023-05-02 01:41:40 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
./setup.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## Workflow
|
2023-04-28 23:12:07 +02:00
|
|
|
|
2023-05-02 18:44:42 +02:00
|
|
|
Check remote servers for changes
|
|
|
|
|
|
|
|
./check.sh
|
|
|
|
|
|
|
|
Pull changes
|
|
|
|
|
|
|
|
./pull.sh
|
|
|
|
|
2023-04-29 01:45:56 +02:00
|
|
|
Start local test server
|
|
|
|
|
|
|
|
./test.sh
|
|
|
|
|
|
|
|
Push changes to remote git repositories
|
2023-04-28 23:12:07 +02:00
|
|
|
|
|
|
|
./push.sh
|
|
|
|
|
2023-04-29 01:45:56 +02:00
|
|
|
Build changes locally
|
|
|
|
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
Build and deploy changes
|
2023-04-28 23:12:07 +02:00
|
|
|
|
2023-05-02 18:44:42 +02:00
|
|
|
./deploy.sh
|