Skip to content

Instantly share code, notes, and snippets.

View tianshuo's full-sized avatar
💭
Learning deeply

Tianshuo tianshuo

💭
Learning deeply
View GitHub Profile
@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@dallonf
dallonf / get-departments.js
Created September 27, 2012 16:13
Managing groups with events
// departments has string parentId, string name
// On GET /departments
if (this.parentId) {
// Recursively build an array of parents
dpd.departments.get({id: parentId, $limitRecursion: 64}, function(parentDep) {
if (parentDep) {
this.parents = [parentDep.name];
if (parentDep.parents) {
this.parents = parentDep.parents.concat(this.parents);
}