Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pr): test-deploy not getting variables in PR to fork source #9

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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