Skip to content

Commit 16cbcff

Browse files
committed
minor change- call build from deploy script
1 parent 08a7035 commit 16cbcff

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.scripts/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
22

3-
hugo
4-
ls
3+
sudo hugo
4+
ls
5+

.scripts/deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3+
# Should be moved to build.sh
4+
# NOTE: Running build.sh and then deploy.sh is not finding the public
5+
# folder which is generated after the build command (hugo).
6+
hugo
7+
38
npm install -g surge
49

510
echo "REF value is ${REF}"
@@ -11,5 +16,7 @@ echo "PR_NUMBER: $PR_NUMBER"
1116
echo "SURGE_LOGIN: $SURGE_LOGIN"
1217
echo "SURGE_TOKEN: $SURGE_TOKEN"
1318
ls
19+
ls "./public"
1420

1521
surge --project $PROJECT_BUILD --domain $DOMAIN;
22+

.scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ location="$(which hugo)"
1818
echo "Hugo binary location: $location"
1919

2020
version="$(hugo version)"
21-
echo "Hugo binary version: $version"
21+
echo "Hugo binary version: $version"

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM node:10-alpine
22
ADD . ./app
33
WORKDIR /app
44

5+
RUN export PR_NUMBER=$(echo ${REF} | cut -d'/' -f3)
6+
57
RUN apk add --no-cache curl
68
RUN apk add --no-cache wget
79
RUN apk add --no-cache bash
@@ -12,7 +14,6 @@ RUN chmod +x .scripts/deploy.sh
1214

1315
RUN .scripts/install.sh
1416

15-
RUN export PR_NUMBER=$(echo ${REF} | cut -d'/' -f3)
17+
ENTRYPOINT .scripts/deploy.sh; /bin/bash
18+
1619

17-
CMD sh .scripts/build.sh
18-
CMD sh .scripts/deploy.sh

0 commit comments

Comments
 (0)