forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (44 loc) · 1.34 KB
/
deploy_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
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: CC-BY-4.0
name: Deploy Docs (Github Pages)
on:
push:
branches:
- main
paths:
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SITE_URL: https://${{ github.repository_owner }}.github.io/cacti
NODEJS_VERSION: v18.18.2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
deploy-docs:
runs-on: ubuntu-22.04
permissions:
contents: write
pages: write
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/[email protected]
with:
node-version: ${{ env.NODEJS_VERSION }}
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Use Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: pip install -r requirements.txt
working-directory: docs
- name: Build packages
run: npm run configure
- name: Build markdown for openapi specs
run: 'python3 docs/scripts/publish_openapi.py'
- name: Build and publish
run: git pull && mkdocs gh-deploy
working-directory: docs