Skip to content

Commit

Permalink
Add Github Action to build and deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DvdMgr committed Jan 16, 2022
1 parent 5ee9331 commit 2b352bc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and deploy docs

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Clone ns-3
run: git clone https://gitlab.com/nsnam/ns-3-dev
- uses: actions/checkout@v2
with:
path: 'ns-3-dev/src/lorawan'
- name: Install dependencies needed to generate docs
run: |
sudo apt-get update
sudo apt-get install dia doxygen sphinx-doc sphinx-common python3-pydot texlive-full latexmk dvipng texlive-font-utils
sudo rm /etc/ImageMagick-*/policy.xml
- name: Build docs
run: |
cd ns-3-dev/
cp utils/.ns3rc ./
sed -i "s/all_modules/lorawan/" .ns3rc
sed -i "s/False/True/" .ns3rc
./ns3 configure
./ns3 docs all
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'docs/'
destination-github-username: 'signetlabdei'
destination-repository-name: 'lorawan-docs'
user-email: [email protected]
target-branch: master
11 changes: 0 additions & 11 deletions generate_docs.sh

This file was deleted.

0 comments on commit 2b352bc

Please sign in to comment.