Skip to content

Commit

Permalink
Add deploy-documents-lastes.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shyunMin committed Jun 19, 2024
1 parent e9a0f0c commit be3d50f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/deploy-documents-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: "Deploy Documents"

on:
schedule:
- cron: "0 16 * * *"
workflow_dispatch:

env:
DOCFX_FILE: docfx_tizen_docs.json
DEPLOY_BRANCH: gh-pages
CACHE_NAME: docfx-gh-pages-site

jobs:

build:
runs-on: [self-hosted, linux, x64]
container:
image: tizendotnet/tizenfx-build-worker:2.4
options: --ulimit nofile=10240:10240

steps:
- uses: actions/checkout@v3
with:
repository: TizenAPI/TizenFX-Docs

- name: Checkout TizenFX sources
run: |
./build_master.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_master.sh restore
./build_master.sh build
./build_master.sh index
- 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'

0 comments on commit be3d50f

Please sign in to comment.