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