-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add github workflow for Azure #216
Conversation
@tobiasdiez, Please change the index document name from the default index.html to taskpane.html in the Azure portal. see the 6th point. |
In contrast to "Azure Storage" apps, "Static Web Apps" don't seem to have this option. I've found Azure/static-web-apps#232 which discusses the same issue and recommends to add an empty index.html. Could you please try this? |
But maybe it's already enough to change JabRef-Word-Addin/webpack.config.js Line 76 in 4377c36
index.html instead of taskpane.html , and change the reference in the manifest at the same time. Not sure if the entry pane has to be called taskpane.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://lively-ground-0d7c50410-216.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://lively-ground-0d7c50410-216.centralus.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://lively-ground-0d7c50410-216.centralus.azurestaticapps.net |
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.
Nice!
I just tried to follow https://docs.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins to test if one could sideload the staged build in Word. However, the address in the manifest points to localhost and not to the (changing) azure staging address. Don't know what's the best way to fix this. The obvious choices of a) having a fixed staging web address or b) transforming the manifest during build to inject the correct address don't seem to be possible right now Azure/static-web-apps#22 Azure/static-web-apps#537.
What could work is to use the output of the deployment https://github.com/Azure/static-web-apps-deploy/blob/0407e359a606e89151694428fa2457e4ef646693/action.yml#L44, transform the manifest file and then do another deployment including the new manifest. Sounds very awkward. Anyway, that's something for a new PR.
We don't need to host the manifest file on the server. This file just points to the location where the addin is hosted. And this shared catalog folder thing is like a shared google drive folder that can only be shared with Windows users. So my suggestion is to create a google drive folder and put the updated manifest file in that folder so that everyone can access it. And another advantage of using a drive folder is that even if our staging web address changes, we can easily update the web address in the manifest file.
I tried it with the updated link, but I got an error because the addin is still not connected with jabref online. It should work after the API azure function is implemented. Edit: Sorry, I didn't know that link changes every time a commit is pushed, I'd suggest we have a stable link in that case if that's possible. |
I think it just changes for every PR. I'll keep on looking at option b,
and here are some links for now 😛
|
Ohh, I didn't realized that the URL is essentially constant except for the PR id. That's a super nice finding @k3KAW8Pnf7mkmdSMPHz27! So in this case, the github action can indeed construct the correct path and inject it into the manifest file before uploading. Then one can simply test the PR by sideloading something like |
Perhaps updating the manifest can be done with https://github.com/marketplace/actions/edit-xml |
fixes #215