Skip to content

Commit

Permalink
Merge pull request #51 from nedimtokic/documentation-workflow
Browse files Browse the repository at this point in the history
Add workflow for documentation publication
  • Loading branch information
harlem88 authored Nov 12, 2024
2 parents 8f076cd + 6bbb879 commit 77054fe
Show file tree
Hide file tree
Showing 4 changed files with 2,628 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/docs-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#
# This file is part of Astarte.
#
# Copyright 2023-2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

name: Docs generation for Github Pages

on:
push:
branches:
# Create the docs only when it matters
- 'master'
- 'release-*'

jobs:
docs:
runs-on: ubuntu-latest
steps:
# Checkout the source
- uses: actions/checkout@v4
with:
path: astarte-device-sdk-csharp
# Checkout the docs repository
- uses: actions/checkout@v4
with:
repository: astarte-platform/docs
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
path: docs
- name: Install doxygen
run: |
sudo apt-get update
sudo apt-get -y install doxygen
- name: Build Docs
working-directory: ./astarte-device-sdk-csharp/docs
run: doxygen doxy_config
- name: Copy Docs
run: |
export DOCS_DIRNAME="device-sdks/csharp/$(echo ${{ github.ref }} | sed 's,refs/heads/,,' | sed 's/master/snapshot/g' | sed 's/release-//g')/api"
rm -rf docs/$DOCS_DIRNAME
mkdir -p docs/$DOCS_DIRNAME
cp -r astarte-device-sdk-csharp/docs/out/html/* docs/$DOCS_DIRNAME/
- name: Commit files
working-directory: ./docs
run: |
git config --local user.email "astarte-machine@ispirata.com"
git config --local user.name "Astarte Bot"
git add .
git diff-index --quiet HEAD || git commit -m "Update CSharp SDK documentation"
- name: Push changes
working-directory: ./docs
run: |
git push origin master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,4 @@ CleaSmartHMIsBackend/mosquitto/data/mosquitto.db

#vscode
.vscode/*
/docs/out
28 changes: 28 additions & 0 deletions docs/docmain.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# This file is part of Astarte.
#
# Copyright 2023-2024 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

/** @mainpage Astarte Device SDK CSharp Documentation
* The Astarte Device SDK for C# is a ready-to-use library that provides communication and pairing primitives to an Astarte Cluster.
*
* The SDK simplifies all the low-level operations like credentials generation, pairing, local storage, device registration and exposes a high-level API to enable device data publication and reception.
*
* See the <a href="https://docs.astarte-platform.org">Astarte Documentation</a> for
* more information about the Astarte platform.
*/
Loading

0 comments on commit 77054fe

Please sign in to comment.