Skip to content

Commit

Permalink
Merge pull request #14 from DTLab-LabCN/DTT-488-Configure-and-deploy-…
Browse files Browse the repository at this point in the history
…Docusaurus

fix(pr): test-deploy not getting variables in PR to fork source
  • Loading branch information
pruneau628 authored Sep 4, 2024
2 parents 8ae05c5 + b7b5ca5 commit 59e9202
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@ jobs:
run: .github/workflows/excluded-paths.sh

- name: Test build website
# We also create the CNAME file, this is useless in staging,
# When running this test in a PR from the staging to the production repository,
# vars.* variables are not made avaiable to the action !?!
# c.f: see https://github.com/orgs/community/discussions/44322
# We are thus faking those by sourcing .env.sample file
# thus using hopefully harmless staging values
#
# We also create the CNAME file, which is useless in staging,
# but required in production.
# It is created temporarily in the static/ folder, because
# docusaurus will copy it to /build
# It is created temporarily in the static/ folder, and docusaurus will
# copy it to the /build directory
run: |
if [ -z "$DTT_DOCS_URL" ] || [ -z "DTT_DOCS_BASE_PATH" ]; then
source .env.sample
fi
echo "$DTT_DOCS_URL" | cut -f 3 -d/ | tee static/CNAME
npm run build

0 comments on commit 59e9202

Please sign in to comment.