1
+ name : " Deploy Documents"
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 16 * * *"
6
+ workflow_dispatch :
7
+
8
+ env :
9
+ DOCFX_FILE : docfx_tizen_docs.json
10
+ DEPLOY_BRANCH : gh-pages
11
+ CACHE_NAME : docfx-gh-pages-site
12
+
13
+ jobs :
14
+
15
+ build :
16
+ runs-on : [self-hosted, linux, x64]
17
+ container :
18
+ image : tizendotnet/tizenfx-build-worker:2.4
19
+ options : --ulimit nofile=10240:10240
20
+
21
+ steps :
22
+ - uses : actions/checkout@v3
23
+ with :
24
+ repository : TizenAPI/TizenFX-Docs
25
+
26
+ - name : Checkout TizenFX sources
27
+ run : |
28
+ ./build_master.sh clone
29
+ - name : Cache DocFX output
30
+ id : cache-site
31
+ uses : actions/cache@v2
32
+ with :
33
+ path : _site
34
+ key : ${{ env.CACHE_NAME }}-${{ hashFiles('repos/commits') }}
35
+
36
+ - name : Build Documents
37
+ if : steps.cache-site.outputs.cache-hit != 'true'
38
+ run : |
39
+ ./build_master.sh restore
40
+ ./build_master.sh build
41
+ ./build_master.sh index
42
+ - name : Archive Artifacts
43
+ run : |
44
+ tar cfz site.tar.gz _site/
45
+ - uses : actions/upload-artifact@v2
46
+ with :
47
+ name : documents
48
+ path : site.tar.gz
49
+
50
+ deploy :
51
+ needs : [build]
52
+ runs-on : ubuntu-20.04
53
+
54
+ steps :
55
+ - uses : actions/download-artifact@v2
56
+ with :
57
+ name : documents
58
+
59
+ - name : Extract Artifacts
60
+ run : |
61
+ tar xfz site.tar.gz
62
+ - name : Deploy GitHub Pages
63
+ uses : peaceiris/actions-gh-pages@v3
64
+ with :
65
+ github_token : ${{ secrets.GITHUB_TOKEN }}
66
+ publish_dir : ./_site
67
+ publish_branch : ${{ env.DEPLOY_BRANCH }}
68
+ user_name : ' TizenAPI-Bot'
69
+
70
+ full_commit_message : ' Update documents'
0 commit comments