@@ -126,6 +126,9 @@ script:
126
126
- ' TOX="$(python3 -m site --user-base)/bin/tox" stack --no-terminal test -j4 --coverage'
127
127
- ./lint.sh
128
128
129
+ # Build website
130
+ - stack runhaskell ./app/nirum-docs.hs /tmp/nirum.org/
131
+
129
132
after_script :
130
133
- |
131
134
# Since codecov-haskell doesn't work on Windows,
@@ -142,6 +145,11 @@ after_script:
142
145
--token="$(echo $token_encoded | python -m base64 -d)" \
143
146
spec
144
147
148
+ # Used for making a commit into gh-pages (nirum.org website)
149
+ - git log -n1 --format="format:%s%n%n$TRAVIS_COMMIT_RANGE" > /tmp/git-commit
150
+ - git log -n1 --format="format:%an" > /tmp/git-author
151
+ - git log -n1 --format="format:%ae" > /tmp/git-author-email
152
+
145
153
notifications :
146
154
webhooks :
147
155
urls :
@@ -235,3 +243,20 @@ after_deploy: |
235
243
python -c 'import json, os; print(json.dumps({"username": os.environ["HACKAGE_USERNAME"], "password": os.environ["HACKAGE_PASSWORD"]}))' > ~/.stack/upload/credentials.json
236
244
stack --no-terminal upload --ignore-check --no-signature .
237
245
fi
246
+
247
+ # Upload website to nirum.org
248
+ echo "$NIRUM_GH_PAGES_KEY" | tr / '\n' > /tmp/nirum_org_ed25519
249
+ chmod 600 /tmp/nirum_org_ed25519
250
+ eval "$(ssh-agent -s)"
251
+ ssh-add /tmp/nirum_org_ed25519
252
+ pushd /tmp/nirum.org/
253
+ git init
254
+ git config user.name "$(cat /tmp/git-author)"
255
+ git config user.email "$(cat /tmp/git-author-email)"
256
+ echo nirum.org > CNAME
257
+ touch .nojekyll
258
+ git add .
259
+ git commit -a -F /tmp/git-commit
260
+ git push -f [email protected] :nirum-lang/nirum-lang.github.io.git master
261
+ popd
262
+ rm /tmp/nirum_org_ed25519
0 commit comments