Skip to content

Commit 28bcee7

Browse files
committed
fixed problems in continous publishing
1 parent e40c95c commit 28bcee7

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

.github/workflows/continous_publishing_latest.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Continous Publishing (latest)
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
# Cancel previous builds because only latest build is shown online
@@ -13,6 +13,7 @@ jobs:
1313
- run: |
1414
# get branch for 'latest' build
1515
BRANCH=${REF##*/}
16+
echo $BRANCH
1617
1718
# when building 'latest; documentation when commits are pushed to a BRANCH then kill previous
1819
# 'latest' builds. Note: we select below only builds for 'latest' builds to kill, not 'stable' builds.
@@ -73,10 +74,10 @@ jobs:
7374
GITHUB_PAGES_WEBSITE_URL="https://${REPOSITORY_OWNER}.github.io/${REPOSITORY_NAME}"
7475
7576
echo WEBSITE_SUBDIR=$WEBSITE_SUBDIR
76-
echo "::set-env name=WEBSITE_SUBDIR::$WEBSITE_SUBDIR"
77+
echo "WEBSITE_SUBDIR=$WEBSITE_SUBDIR" >> $GITHUB_ENV
7778
7879
echo GITHUB_PAGES_WEBSITE_URL=$GITHUB_PAGES_WEBSITE_URL
79-
echo "::set-env name=GITHUB_PAGES_WEBSITE_URL::$GITHUB_PAGES_WEBSITE_URL"
80+
echo "GITHUB_PAGES_WEBSITE_URL=$GITHUB_PAGES_WEBSITE_URL" >> $GITHUB_ENV
8081
- name: Commit build html documentation to gh-pages branch checkout in gh-pages subdir
8182
run: |
8283
# clone gh-pages branch into

.github/workflows/continous_publishing_stable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
4646
4747
echo WEBSITE_SUBDIR=$WEBSITE_SUBDIR
48-
echo "::set-env name=WEBSITE_SUBDIR::$WEBSITE_SUBDIR"
48+
echo "WEBSITE_SUBDIR=$WEBSITE_SUBDIR" >> $GITHUB_ENV
4949
5050
echo GITHUB_PAGES_WEBSITE_URL=$GITHUB_PAGES_WEBSITE_URL
51-
echo "::set-env name=GITHUB_PAGES_WEBSITE_URL::$GITHUB_PAGES_WEBSITE_URL"
51+
echo "GITHUB_PAGES_WEBSITE_URL=$GITHUB_PAGES_WEBSITE_URL" >> $GITHUB_ENV
5252
- name: Commit build html documentation to gh-pages branch checkout in gh-pages subdir
5353
run: |
5454
# clone gh-pages branch into
@@ -86,7 +86,7 @@ jobs:
8686
fi
8787
8888
echo CREATE_RELEASE=$CREATE_RELEASE
89-
echo "::set-env name=CREATE_RELEASE::$CREATE_RELEASE"
89+
echo "CREATE_RELEASE=$CREATE_RELEASE" >> $GITHUB_ENV
9090
- name: Create Release
9191
if: env.CREATE_RELEASE == 'yes'
9292
# https://github.com/actions/create-release

source/continuous_publishing.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# -- manual configuration -----------------------------------------------------
77

8-
github_user_or_organisation='harcokuppens'
8+
github_user_or_organisation='torxakis'
99
github_repo_name="develdocs"
1010

1111
# when publishing documentation as file assets on github use following filename:
@@ -34,6 +34,7 @@
3434
toolversion = f.readline()
3535
toolversion=toolversion.strip()
3636

37+
import os,sys
3738
import subprocess
3839
tag=subprocess.check_output(["git","tag", "--points-at","HEAD"],encoding="utf-8").strip()
3940
print("tag="+tag)
@@ -70,7 +71,18 @@
7071

7172

7273
document_name = document_name_format.format(TOOLVERSION=toolversion,DOCVERSION=docversion)
73-
print("::set-env name=DOCUMENT_NAME::" + document_name)
74+
75+
githubenv=os.environ.get('GITHUB_ENV')
76+
if githubenv:
77+
print("using GITHUB_ENV\n")
78+
handle = open(githubenv, 'a')
79+
else:
80+
print("NOT using GITHUB_ENV\n")
81+
handle = sys.stdout
82+
83+
handle.write("DOCUMENT_NAME=" + document_name + "\n")
84+
85+
if githubenv: handle.close()
7486

7587
pdfdocumenturl="https://github.com/{0}/{1}/releases/download/{2}/{3}.pdf".format(github_user_or_organisation,
7688
github_repo_name,release_name,document_name)
@@ -107,6 +119,8 @@
107119

108120

109121

122+
123+
110124
# -- Configuration for HTML output -------------------------------------------------
111125

112126
# use sphinx readthedocs theme

0 commit comments

Comments
 (0)