forked from opendocsg/opendoc-formsg-faq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amplify.yml
44 lines (42 loc) · 1.92 KB
/
amplify.yml
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
version: 1.1
frontend:
phases:
preBuild:
commands:
- "curl -X POST -H 'Content-type: application/json' --data '{\"blocks\":[{\"type\": \"section\",\"text\": {\"type\": \"mrkdwn\",\"text\": \"*Github Repo:* '$AWS_CLONE_URL'\n*Branch:* '$AWS_BRANCH'\n*Status*: 🛠 Build started.\"}}]}' $SLACK_WEBHOOK_URL"
- rvm --default use $VERSION_RUBY_2_6
- yum install -y urw-fonts
- git clone https://github.com/opendocsg/opendoc-fonts.git ~/.fonts
- fc-cache -f -v
- bundle install
build:
commands:
- if [ "${AWS_BRANCH}" = "master" ]; then JEKYLL_ENV=production bundle exec jekyll build; fi
- if [ "${AWS_BRANCH}" != "master" ]; then JEKYLL_ENV=development bundle exec jekyll build; fi
postBuild:
commands:
- chmod +x ./_site/assets/startup/build.sh
- ./_site/assets/startup/build.sh
- "curl -X POST -H 'Content-type: application/json' --data '{\"blocks\":[{\"type\": \"section\",\"text\": {\"type\": \"mrkdwn\",\"text\": \"*Github Repo:* '$AWS_CLONE_URL'\n*Branch:* '$AWS_BRANCH'\n*Status*: 🟢 Build successful.\"}}]}' $SLACK_WEBHOOK_URL"
artifacts:
baseDirectory: _site
files:
- '**/*'
cache:
paths:
- node_modules
customHeaders:
- pattern: '**/*'
headers:
- key: 'X-Frame-Options'
value: 'SAMEORIGIN'
- key: 'X-XSS-Protection'
value: '1; mode=block'
- key: 'X-Content-Type-Options'
value: 'nosniff'
- key: 'Content-Security-Policy'
value: "default-src 'self'; img-src *; frame-src *; font-src *; media-src *; style-src * 'unsafe-inline'; connect-src 'self' https://*.opendoc.sg; script-src 'self' 'sha256-cZeHu5WczV7gma7unmZ5l6WP54Plm4jzl1MUr4q2lrY='"
- key: 'Referrer-Policy'
value: 'no-referrer'
- key: 'Feature-Policy'
value: "geolocation 'none'; microphone 'none'; camera 'none'"