Skip to content

Commit f7df500

Browse files
committed
Add a Github action to deploy
This replaces Travis as the integration tool with Github Actions. The benefit is that it can also deploy to the gh-pages branch. This can then be deployed automatically after merge. It also switches from Gitbook legacy to Honkit. Since Github legacy is being phased out, this is needed.
1 parent 9f77dca commit f7df500

File tree

7 files changed

+74
-16
lines changed

7 files changed

+74
-16
lines changed

.bookignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.bookignore
2+
.github
3+
.gitignore
4+
crowdin.yaml
5+
package-lock.json
6+
package.json

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'djangogirls/tutorial'
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
persist-credentials: false
16+
17+
- name: Install and Build
18+
run: |
19+
npm install
20+
npx honkit build
21+
22+
- name: Deploy
23+
uses: JamesIves/github-pages-deploy-action@releases/v3
24+
with:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
BRANCH: gh-pages
27+
FOLDER: _book

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build
2+
on:
3+
- pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
persist-credentials: false
13+
14+
- name: Install and Build
15+
run: |
16+
npm install
17+
npx honkit build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ MANIFEST
22
.DS_Store
33
_book
44
node_modules
5+
package-lock.json
56
.idea
67
.swp

.nojekyll

Whitespace-only changes.

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "tutorial",
3+
"version": "1.0.0",
4+
"description": "The Django Girls tutorial",
5+
"main": "index.js",
6+
"dependencies": {},
7+
"devDependencies": {
8+
"gitbook-plugin-codeblock-label": "*",
9+
"gitbook-plugin-collapsible-menu": "*",
10+
"gitbook-plugin-ga": "^2.0.0",
11+
"gitbook-plugin-github": "2.0.0",
12+
"gitbook-plugin-heading-anchors": "^1.0.3",
13+
"gitbook-plugin-language-picker": "*",
14+
"gitbook-plugin-richquotes": "0.0.9",
15+
"gitbook-plugin-sectionx-ex": "*",
16+
"gitbook-plugin-sidebar-ad": "*",
17+
"honkit": "^3.4.0"
18+
},
19+
"scripts": {},
20+
"keywords": [],
21+
"author": "Django Girls",
22+
"license": "CC-BY-SA-4.0"
23+
}

0 commit comments

Comments
 (0)