In this semester, our team tried to develop an mobile APP using Flutter. One user story is that when user are not using the APP, he/she should be notified when new friend request or new message coming

Since we are using firebase as our backend service, cloud functions can be used to monitor the database, and send notifications when triggered

阅读全文 »

突然想起来用 Travis CI 来替换掉之前用的hexo-deployer-git, 正好避免了源文件的管理混乱虽然本来也没几篇文章

顺道还把被停用很久的swiftype关了换回了Google CSE。一度不知道swiftype取消了免费账户

网上很多老资料用的Custom Deployment的方法,现在Travis CI 已经支持GitHub Pages,只需要简单的配置一下即可。

Hexo提供了设置指南以及.travis.yml的配置例子,当设置好后每次提交源文件到master分支 TravisCI会自动生成页面并且部署到gh-pages分支上。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sudo: false
language: node_js
node_js:
- 10 # use nodejs v10 LTS
cache: npm
branches:
only:
- master # build master branch only
script:
- hexo generate # generate static files
deploy:
provider: pages
skip-cleanup: true
github-token: $GH_TOKEN
keep-history: true
on:
branch: master
local-dir: public

需要注意的是该方法不适用于仓库名为<user>.github.io这种格式的仓库,因为GitHub 必须从master分支生成 user和organization的页面而不是gh-pages。

User pages must be built from the master branch.

因此如果用的是personal或者需要修改一下官方文档上的yml文件配置。

现在Travis CI默认的依旧是dpl v1,但是在log里又会按照dpl v2 的指示弹警告,像

deploy: deprecated key skip_cleanup (not supported in dpl v2, use cleanup)

cleanup在 dpl v2中默认是设置为 false 的而 dpl v1 中仍需要手动加入skip_cleanup: true来避免生成目录被删除。

还有sudo: false已被弃用github_token已经被替换为token等部分 dpl v2的属性又已经被支持

在基于目前的新文档的建议下,最后的.travis.yml设置如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
os: linux
language: node_js
node_js:
- 10
cache: npm
branches:
only:
- source # store source code of hexo in source branch
script:
- hexo generate
deploy:
provider: pages
skip_cleanup: true
token: $GH_TOKEN
keep_history: true
target_branch: master
on:
branch: source
local_dir: public

新奥尔良地处路易斯安那,充满着南国风情,去之前留在Trip Ideas里的tag有Food, Art, Music, Nightlife,体验过后每一点都不会让人失望。三月中旬去的天气正好,既不炎热也不潮湿,五月去佛罗里达那会儿一下飞机甚至能感受到水汽扑面。有机会的话还是很想去这里小住一段时间,悠悠闲闲的体验当地安逸的生活。当然南方的食物才是这趟旅行最不亏的,非常的具有特色。

阅读全文 »
0%