Skip to content

Add documentation

Add documentation #13

Workflow file for this run

#
# Distributed Linear Algebra with Future (DLAF)
#
# Copyright (c) 2018-2024, ETH Zurich
# All rights reserved.
#
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause
#
name: Docs
on:
push:
branches:
- main
- '**' # TODO: Remove when done testing!
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
# Pull requests to main trigger this workflow
# However, the deployment is skipped (see check on github.ref)
pull_request:
branches:
- main
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
python -m pip install --upgrade pip
python -m pip install ford
- name: Build (main)
run: |
python -m ford --output_dir ghpages DLA-Future-Fortran.md
echo {{ github.repository }}
- name: Publish (main)
#if: "github.repository == 'eth-cscs/DLA-Future-Fortran' && github.ref == 'refs/heads/main'"
if: "github.repository == 'RMeli/DLA-Future-Fortran'"
run: |
COMMIT_MSG=`git log -n 1 --pretty=format:%s`
mv ghpages main
git config user.name "Documentation CI Action" && git config user.email "[email protected]"
git fetch --no-tags --depth=1 origin +refs/heads/docs-ghpages:refs/heads/docs-ghpages
git symbolic-ref HEAD refs/heads/docs-ghpages && git reset
git add main && git commit --allow-empty -m "Documentation: $COMMIT_MSG" && git push --set-upstream origin docs-ghpages
- name: Publish (tag)
if: "github.repository == 'eth-cscs/DLA-Future-Fortran' && startsWith(github.ref, 'refs/tags/v')"
run: |
TAG=${{ github.ref_name }}
mv ghpages $TAG
git config user.name "Documentation CI Action" && git config user.email "[email protected]"
git fetch --no-tags --depth=1 origin +refs/heads/docs-ghpages:refs/heads/docs-ghpages
git symbolic-ref HEAD refs/heads/docs-ghpages && git reset
git add $TAG && git commit --allow-empty -m "Documentation: add doccumentation for $TAG" && git push --set-upstream origin docs-ghpages