@@ -3,80 +3,86 @@ name: CI
3
3
4
4
on :
5
5
push :
6
- branches :
6
+ branches :
7
7
- master
8
8
9
9
jobs :
10
10
build :
11
11
12
- runs-on : ubuntu-latest
12
+ runs-on : ubuntu-18.04
13
13
14
14
steps :
15
15
16
- - name : Install Calibre
17
- run : sudo apt install calibre # for `ebook-convert` command
16
+ - name : Install Calibre
17
+ run : sudo apt install calibre # for `ebook-convert` command
18
18
19
- # https://github.com/actions/setup-node
20
- - name : Install Node.js
21
- uses : actions/setup-node@v2-beta
22
- with :
23
- node-version : ' 14'
24
-
25
- # https://github.com/actions/checkout
26
- - name : Checkout
27
- uses : actions/checkout@v2
19
+ # https://github.com/actions/setup-node
20
+ - name : Install Node.js
21
+ uses : actions/setup-node@v2-beta
22
+ with :
23
+ node-version : ' 14'
28
24
29
- # https://github.com/honkit/honkit
30
- - name : Run Honkit
31
- run : |
32
- npm install honkit --save-dev
33
- npx honkit build . public --log=debug
34
- npx honkit pdf . byte-of-python.pdf
35
- npx honkit epub . byte-of-python.epub
25
+ # https://github.com/actions/checkout
26
+ - name : Checkout
27
+ uses : actions/checkout@v2
36
28
37
- # https://github.com/crazy-max/ghaction-github-pages
38
- - name : Push to GitHub Pages
39
- if : success()
40
- uses : crazy-max/ghaction-github-pages@v2
41
- with :
42
- target_branch : gh-pages
43
- build_dir : public
44
- fqdn : python.swaroopch.com
45
- env :
46
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29
+ # https://github.com/honkit/honkit
30
+ - name : Run Honkit
31
+ run : |
32
+ npm install honkit --save-dev
33
+ npx honkit build . public --log=debug
34
+ npx honkit pdf . byte-of-python.pdf
35
+ npx honkit epub . byte-of-python.epub
47
36
48
- # https://github.com/actions/create-release
49
- - name : Create Release
50
- id : create_release
51
- uses : actions/create-release@v1
52
- env :
53
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
- with :
55
- tag_name : v${{ github.sha }}
56
- release_name : Release v${{ github.sha }}
57
- draft : false
58
- prerelease : false
37
+ # https://github.com/crazy-max/ghaction-github-pages
38
+ - name : Push to GitHub Pages
39
+ if : success()
40
+ uses : crazy-max/ghaction-github-pages@v2
41
+ with :
42
+ target_branch : gh-pages
43
+ build_dir : public
44
+ fqdn : python.swaroopch.com
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59
47
60
- # https://github.com/actions/upload-release-asset
61
- - name : Upload Release PDF
62
- id : upload-release-pdf
63
-
64
- env :
65
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
- with :
67
- upload_url : ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
68
- asset_path : ./byte-of-python.pdf
69
- asset_name : byte-of-python.pdf
70
- asset_content_type : application/pdf
71
-
72
- # https://github.com/actions/upload-release-asset
73
- - name : Upload Release EPUB
74
- id : upload-release-epub
75
-
76
- env :
77
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78
- with :
79
- upload_url : ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
80
- asset_path : ./byte-of-python.epub
81
- asset_name : byte-of-python.epub
82
- asset_content_type : application/epub+zip
48
+ # https://github.com/actions/create-release
49
+ - name : Create Release
50
+ id : create_release
51
+ uses : actions/create-release@v1
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ with :
55
+ tag_name : v${{ github.sha }}
56
+ release_name : Release v${{ github.sha }}
57
+ draft : false
58
+ prerelease : false
59
+
60
+ # https://github.com/actions/upload-release-asset
61
+ - name : Upload Release PDF
62
+ id : upload-release-pdf
63
+
64
+ env :
65
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
+ with :
67
+ # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include
68
+ # a `upload_url`. See this blog post for more info:
69
+ # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
70
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
71
+ asset_path : ./byte-of-python.pdf
72
+ asset_name : byte-of-python.pdf
73
+ asset_content_type : application/pdf
74
+
75
+ # https://github.com/actions/upload-release-asset
76
+ - name : Upload Release EPUB
77
+ id : upload-release-epub
78
+
79
+ env :
80
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
+ with :
82
+ # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include
83
+ # a `upload_url`. See this blog post for more info:
84
+ # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
85
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
86
+ asset_path : ./byte-of-python.epub
87
+ asset_name : byte-of-python.epub
88
+ asset_content_type : application/epub+zip
0 commit comments