33## Intro
44Reveal-skel is a forkable template for a presentation based on the [ Reveal.js] ( http://lab.hakim.se/reveal-js/ ) HTML framework.
55
6- [ Travis-CI config ] ( .travis .yml )
6+ The Github Actions workflow in [ build.yml ] ( .github/workflows/build .yml )
77runs a [ Node.js project] ( package.json ) ,
88calling [ Grunt tasks] ( Gruntfile.coffee ) to
99build [ the presentation] ( template/index.html ) as a website and
10- deploy it on Github Pages via the ` gh-pages ` branch .
10+ deploy it on Github Pages.
1111
1212## Usage
1313* ** Fork** the [ reveal-skel] ( https://github.com/sermons/reveal-skel ) project
1414 + Or in your own git repo, run ` git remote add upstream https://github.com/sermons/reveal-skel `
15- * Setup a ** Github token** for Travis [ (see below)] ( #github-token-for-travis )
15+ + In the Github settings for your forked repository, under 'Pages', set the 'Source' to 'Github Actions'.
16+ + This allows the [ deploy-pages] ( https://github.com/actions/deploy-pages ) action to deploy directly to Github Pages,
17+ without using a ` gh-pages ` branch.
1618* ** Edit** [ package.json] ( package.json ) :
1719 + Package name, git repo, CNAME
1820 + Change ` sample.md ` to ` slides.md `
@@ -25,38 +27,6 @@ deploy it on Github Pages via the `gh-pages` branch.
2527* Static ** assets** (CSS, JS, images, etc) go in [ ` static ` ] ( static )
2628 + Grunt will copy this dir as-is to the root of the deployed site
2729
28- ## Github token for Travis
29- + ** Connect** [ Travis] ( https://travis-ci.com ) to your Github account, if you haven't already
30- + On Github, create an access token: * Settings* &rarr ; * Developer Settings* &rarr ; * Personal access tokens* &rarr ; ** Generate new token**
31- + * Token description* : e.g., "Travis push to gh-pages"
32- + * Select scopes* : check "** repo** "
33- + Press the ** Generate token** button at the bottom
34- + Copy and ** save** the token outside the repo:
35- + ` echo "github_key=...MY_GITHUB_TOKEN..." > ~/.travis-key.conf `
36- + [ Install] ( https://github.com/travis-ci/travis.rb#installation ) the Travis ** gem**
37- + See note in the [ travis-key script] ( travis-key ) for details
38- + Run ` ./travis-key ` to [ securely store the token in Travis] ( https://docs.travis-ci.com/user/encrypting-files/ ) :
39- + Commit, ** push** , and check the [ build log] ( https://travis-ci.com/ ) for errors
40-
41- ## Bot user for Travis deploy
42- If you don't want Travis to have full write-access
43- to all your repos, you may want to create a
44- ** special user** just for pushing to the ` gh-pages `
45- branch. This is what I do:
46-
47- + Create a new Github ** user** (a 'bot')
48- + In the bot account, create an ** access token** as above
49- + ** Save** the token out-of-repo in ` ~/.travis-key.conf `
50- + In your main account, add the bot as a ** collaborator** on your repo:
51- + "* Settings* " &rarr ; "* Collaborators & ; teams* " &rarr ; "* Collaborators* "
52- + Give the bot ** Write** access so it can push
53- + Or: [ add the bot to an organization] ( https://developer.github.com/guides/managing-deploy-keys/#machine-users )
54- + ** Prevent** the bot from pushing to master:
55- + "* Settings* " &rarr ; "* Branches* " &rarr ; "* Protected branches* " &rarr ; "* master* "
56- + Check "* Protect this branch* " and "* Restrict who can push to this branch* "
57- + Now the bot can ** only** push to gh-pages
58- + Run the ** script** ` ./travis-key ` in each repo
59-
6030## Multiplex (remote-control)
6131Don't use the default multiplex socket ID in the template, or your presentation
6232can be controlled by anyone with the corresponding secret
0 commit comments