Skip to content

chore: add CODER_DOCS_MAIN_BRANCH to build preview #402

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

Merged
merged 1 commit into from
Jun 16, 2021
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
1 change: 1 addition & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
CODER_DOCS_MAIN_BRANCH: ${{ github.sha }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to test that your change takes effect, you will also need to modify this line to check out your branch: https://github.com/cdr/docs/pull/402/files#diff-22da830e02ef5bed54ecad981722fd9c940aec797740c09927d4a904df0bccd6L20

You should be able to check the deployment log for the preview build and verify that Vercel emits the message the variable being overridden

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I did not understand this "In order to test that your change takes effect, you will also need to modify this line to check out your branch:".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow works by cloning the monorepo's default branch (master), patching the docs submodule, and then deploying the monorepo and coder.com site to Vercel. Since you didn't modify the line that I referenced, it's cloning from master and you're not testing your changes.

In order to test your changes, you will need to change the reference that it checks out to be the branch in the monorepo that you made your changes on. Otherwise, this just shows that adding the environment variable doesn't break the existing build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh ok, I gotcha. I will merge the new docs on master soon - any time today. So we can keep it as it is I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jawnsy do you think we could merge this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go for it :)


- name: Update Deployment
# If we don't specify always, it won't run this check if failed.
Expand Down