Skip to content

Commit 47779bc

Browse files
authored
Merge pull request #49 from apache/use-workdir
Don't rely on version in build-cmark.sh script
2 parents de758d7 + 35bd634 commit 47779bc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pelican/action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ runs:
5252
- name: fetch and build libcmark-gfm.so
5353
if: ${{ inputs.gfm == 'true' }}
5454
shell: bash
55+
env:
56+
WORKDIR: /opt/pelican-asf # where to build GFM
57+
GFM_VERSION: '0.28.3.gfm.12' # ensure we agree with build-cmark.sh script
5558
run: |
5659
{
5760
# disable stdout unless debug is on
@@ -62,15 +65,16 @@ runs:
6265
exec >/dev/null
6366
fi
6467
# Don't pollute site checkout
65-
pushd .. # .. must agree with LIBCMARKDIR
66-
bash ${{ github.action_path }}/build-cmark.sh
68+
mkdir -p $WORKDIR
69+
pushd $WORKDIR
70+
bash ${{ github.action_path }}/build-cmark.sh $GFM_VERSION
6771
popd
72+
# ensure LIBCMARKDIR is defined for subsequent steps
73+
echo "LIBCMARKDIR=${WORKDIR}/cmark-gfm-${GFM_VERSION}/lib" >> $GITHUB_ENV
6874
}
6975
7076
- name: Generate website from markdown
7177
shell: bash
72-
env: # in case we are using GFM (otherwise ignored)
73-
LIBCMARKDIR: "../cmark-gfm-0.28.3.gfm.12/lib"
7478
run: |
7579
if [ "${{ inputs.debug }}" == 'true' ]
7680
then

0 commit comments

Comments
 (0)