Skip to content

Commit b4aa70f

Browse files
authored
Merge pull request #223 from novalagung/refactor/structure
fix: cd script
2 parents a54616e + 2cb2ea0 commit b4aa70f

File tree

4 files changed

+25
-20
lines changed

4 files changed

+25
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
1615
- uses: actions/setup-go@v4
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: 11
19+
check-latest: true
1720
- name: 'Installing requirements'
21+
run: |
22+
npm install -g gitbook-cli
23+
cd ~/.gitbook/versions/3.2.3 && npm i npm@5
24+
cd ${{ github.workspace }}
25+
- name: 'Generating distributable files'
1826
run: |
1927
rm -f README.md
2028
mv content/* .
2129
mv etc/* .
22-
npm install
23-
- name: 'Generating distributable files'
24-
run: |
2530
go run fix-webbook.go -type=pre
26-
npm run build
31+
gitbook install
32+
gitbook build
2733
go run fix-webbook.go -type=post
2834
cd _book
2935
echo '<html><head><meta http-equiv="refresh" content="0; url=https://dasarpemrogramangolang.novalagung.com/"></head></html>' > 404.html
@@ -48,14 +54,12 @@ jobs:
4854
name: 'deploy ebook'
4955
runs-on: ubuntu-latest
5056
steps:
51-
- uses: actions/checkout@v2
57+
- uses: actions/checkout@v3
58+
- uses: actions/setup-go@v4
5259
- uses: actions/setup-node@v2
5360
with:
5461
node-version: 11
5562
check-latest: true
56-
- uses: actions/setup-go@v2
57-
with:
58-
go-version: 1.14
5963
- name: 'Installing requirements'
6064
run: |
6165
npm install -g gitbook-cli svgexport

.github/workflows/lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
1514
- uses: actions/setup-go@v4
16-
- name: 'Installing requirements'
15+
- uses: actions/setup-node@v3
16+
- name: 'Test build distributable files'
1717
run: |
1818
rm -f README.md
1919
mv content/* .
2020
mv etc/* .
2121
npm install
22-
- name: 'Test build distributable files'
23-
run: |
2422
npm run build

package-lock.json

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "dasarpemrogramangolang",
33
"version": "1.0.0",
44
"description": "Ebook belajar dasar pemrograman Go, mulai dari 0",
5-
"main": "gitbook-plugin-disqus.js",
65
"devDependencies": {
76
"gitbook-plugin-disqus": "^1.0.1",
87
"gitbook-plugin-docsearch-v3": "^1.0.1",

0 commit comments

Comments
 (0)