-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
45 lines (36 loc) · 1.23 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# !/bin/bash
if [ "$CF_PAGES_BRANCH" == "main" ]; then
echo "Building for PRODUCTION 🔥"
curl https://sh.rustup.rs -sSf | sh -s -- -y # Cargo installation
source "$HOME/.cargo/env"
# apt install graphviz # Graphviz installation
# REPO_DIR="yeast_component"
# REPO_URL="https://github.com/Alzymologist/yeast"
# REPO_BRANCH="main"
mkdir content
cp -R content_fresh/* content
# mkdir $REPO_DIR
# git clone --branch $REPO_BRANCH $REPO_URL $REPO_DIR
# cd $REPO_DIR
# cargo run -- --production
# cp -R output/* ../static/yeast-component-output
# cd ..
zola build
elif [ "$CF_PAGES_BRANCH" != "main" ]; then
echo "Building for STAGING 🔥"
curl https://sh.rustup.rs -sSf | sh -s -- -y # Cargo installation
source "$HOME/.cargo/env"
# apt install graphviz # Graphviz installation
# REPO_DIR="yeast_component"
# REPO_URL="https://github.com/Alzymologist/yeast"
# REPO_BRANCH="feature-2"
mkdir content
cp -R content_fresh/* content
# mkdir $REPO_DIR
# git clone --branch $REPO_BRANCH $REPO_URL $REPO_DIR
# cd $REPO_DIR
# cargo run -- --staging
# cp -R output/* ../static/yeast-component-output
# cd ..
zola build
fi