File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : hugo-book auto build
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-18.04
11+ steps :
12+ - uses : actions/checkout@v1
13+ with :
14+ submodules : true
15+
16+ # https://github.com/actions/checkout#checkout-multiple-repos-nested
17+ - name : Checkout hugo-builder
18+ uses : actions/checkout@v2
19+ with :
20+ repository : tangx/hugobook-builder
21+ path : hugobook-builder
22+
23+ - name : create blog
24+ run : |
25+ find ./ -maxdepth 2
26+ env
27+ cp -a ./docs/* hugobook-builder/content/
28+ cp README.md hugobook-builder/content/_index.md
29+
30+ - name : show env
31+ run : |
32+ env
33+
34+ - name : Setup Hugo
35+ uses : peaceiris/actions-hugo@v2
36+ with :
37+ hugo-version : ' 0.84.0'
38+ extended : true
39+
40+ - name : Build
41+ run : |
42+ cd hugobook-builder
43+ hugo --gc --minify --cleanDestinationDir --baseURL=https://books.tangx.in/kustz/
44+ touch public/.nojekyll
45+
46+ - name : Pushes to another repository
47+ uses : cpina/github-action-push-to-another-repository@main
48+ env :
49+ API_TOKEN_GITHUB : ${{ secrets.API_TOKEN_GITHUB }}
50+ with :
51+ source-directory : ' hugobook-builder/public'
52+ destination-github-username : ' tangx'
53+ destination-repository-name : ' hugobook'
54+ 55+ target-branch : master
56+ target-directory : ' /kustz'
You can’t perform that action at this time.
0 commit comments