-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Add support for deploying Telescope using spa-tools #273
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f4dbb3b
Add NOTION_API_KEY secret to build workflow
macko911 d1d1467
Improve file request detection in viewer-request
macko911 45f877d
Add support for serving nested index.html files
macko911 4c96d1c
docs(terraform-module): Autogenerated documentation
github-actions[bot] 7536cf3
Output permanent preview url from deploy job
macko911 9c4a834
Add preview_url to outputs
macko911 73de6fd
Log preview url
macko911 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,9 @@ on: | |
deployment_url: | ||
description: "URL where the deployment can be accessed" | ||
value: ${{ jobs.deploy.outputs.deployment_url }} | ||
preview_url: | ||
description: "Permanent URL where the deployment can be accessed" | ||
value: ${{ jobs.deploy.outputs.preview_url }} | ||
|
||
jobs: | ||
deploy: | ||
|
@@ -69,6 +72,7 @@ jobs: | |
url: ${{ steps.deployment-url.outputs.url }} | ||
outputs: | ||
deployment_url: ${{ steps.deployment-url.outputs.url }} | ||
preview_url: ${{ steps.preview-url.outputs.url }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|
@@ -196,16 +200,23 @@ jobs: | |
with: | ||
bucket_name: ${{ inputs.bucket_name }} | ||
|
||
- name: Get Preview Url | ||
id: preview-url | ||
run: | | ||
preview_url="https://${{ steps.cursor-update.outputs.branch_label }}.${{ inputs.domain_name }}" | ||
echo "Permanent preview url $preview_url" | ||
echo "url=$preview_url" >> $GITHUB_OUTPUT | ||
|
||
- name: Update PR Description | ||
uses: pleo-io/spa-tools/actions/[email protected] | ||
if: ${{ github.event_name == 'pull_request' && steps.is-version-already-deployed.outputs.is_deployed == 'false' }} | ||
if: ${{ github.event_name == 'pull_request' && inputs.app_name && steps.is-version-already-deployed.outputs.is_deployed == 'false' }} | ||
with: | ||
app_name: ${{ inputs.app_name }} | ||
app_icon: ${{ inputs.app_icon }} | ||
as_labels: true | ||
links: | | ||
[ | ||
{"name": "${{ inputs.app_name }} preview", "url": "https://${{ steps.cursor-update.outputs.branch_label }}.${{ inputs.domain_name }}"}, | ||
{"name": "${{ inputs.app_name }} preview", "url": "${{ steps.preview-url.outputs.url }}"}, | ||
{"name": "Current Permalink", "url": "${{ steps.deployment-url.outputs.url }}"} | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,9 @@ on: | |
deployment_url: | ||
description: "URL where the deployment can be accessed" | ||
value: ${{ jobs.deploy.outputs.deployment_url }} | ||
preview_url: | ||
description: "Permanent URL where the deployment can be accessed" | ||
value: ${{ jobs.deploy.outputs.preview_url }} | ||
|
||
jobs: | ||
deploy: | ||
|
@@ -69,6 +72,7 @@ jobs: | |
url: ${{ steps.deployment-url.outputs.url }} | ||
outputs: | ||
deployment_url: ${{ steps.deployment-url.outputs.url }} | ||
preview_url: ${{ steps.preview-url.outputs.url }} | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|
@@ -196,16 +200,23 @@ jobs: | |
with: | ||
bucket_name: ${{ inputs.bucket_name }} | ||
|
||
- name: Get Preview Url | ||
id: preview-url | ||
run: | | ||
preview_url="https://${{ steps.cursor-update.outputs.branch_label }}.${{ inputs.domain_name }}" | ||
echo "Permanent preview url $preview_url" | ||
echo "url=$preview_url" >> $GITHUB_OUTPUT | ||
|
||
- name: Update PR Description | ||
uses: pleo-io/spa-tools/actions/[email protected] | ||
if: ${{ github.event_name == 'pull_request' && steps.is-version-already-deployed.outputs.is_deployed == 'false' }} | ||
if: ${{ github.event_name == 'pull_request' && inputs.app_name && steps.is-version-already-deployed.outputs.is_deployed == 'false' }} | ||
with: | ||
app_name: ${{ inputs.app_name }} | ||
app_icon: ${{ inputs.app_icon }} | ||
as_labels: true | ||
links: | | ||
[ | ||
{"name": "${{ inputs.app_name }} preview", "url": "https://${{ steps.cursor-update.outputs.branch_label }}.${{ inputs.domain_name }}"}, | ||
{"name": "${{ inputs.app_name }} preview", "url": "${{ steps.preview-url.outputs.url }}"}, | ||
{"name": "Current Permalink", "url": "${{ steps.deployment-url.outputs.url }}"} | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
311 changes: 295 additions & 16 deletions
311
terraform-module/edge-lambdas/dist/viewer-request/index.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to consider the json files generated by gatsby (or other SSGs) for navigation after initial load?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't those be handled by the previous condition
isFileRequest
?Frankly I'm not loving that we are handling this ourselves this way but is seems to have served us well so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah you're right, didn't make a lot of sense what I wrote - this is only for rewriting paths where we don't have a file.