Skip to content

Commit

Permalink
Unify docs action and automate release documentation generation
Browse files Browse the repository at this point in the history
  • Loading branch information
rasolca committed Nov 22, 2023
1 parent c4e5bba commit d4d538e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/doc-push.yml

This file was deleted.

25 changes: 24 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Docs

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- master
pull_request:
branches:
- master
Expand All @@ -18,4 +23,22 @@ jobs:
uses: actions/checkout@v3
- name: Make Docs
run: |
cd doc && make doc
cd doc && make doc && cd ..
- name: Push Docs master
if: "github.repository == 'eth-cscs/DLA-Future' && github.ref == 'refs/heads/master'"
run: |
mv doc/html master
COMMIT_MSG=`git log -n 1 --pretty=format:%s`
git config user.name "Doc CI Action" && git config user.email "rasolca@users.noreply.github.com"
git fetch --no-tags --depth=1 origin +refs/heads/docs:refs/heads/docs
git symbolic-ref HEAD refs/heads/docs && git reset
git add master && git commit --allow-empty -m "Doc: $COMMIT_MSG" && git push --set-upstream origin docs
- name: Push Docs release
if: "github.repository == 'eth-cscs/DLA-Future' && startsWith(github.ref, 'refs/tags/v')"
run: |
TAG=${{ github.ref_name }}
mv doc/html $TAG
git config user.name "Doc CI Action" && git config user.email "rasolca@users.noreply.github.com"
git fetch --no-tags --depth=1 origin +refs/heads/docs:refs/heads/docs
git symbolic-ref HEAD refs/heads/docs && git reset
git add $TAG && git commit --allow-empty -m "Doc: add $TAG documentation" && git push --set-upstream origin docs

0 comments on commit d4d538e

Please sign in to comment.