0

I have docfx project built by and deployed with GitHub workflow actions to an Azure Static Web App.

For this specific project, I need the docfx generated files are uploaded to a specific subfolder (i.e "en-US"), so the documentation start site URL would be something like:

www.mydomain.com/en-US/index.html

I am trying to set up a workflow job to do that, but I do not know what values to set on Azure/static-web-apps-deploy@v1 action:

deploy:
runs-on: ubuntu-latest
needs: build
steps:
  - uses: actions/download-artifact@v2
    with:
      name: _site          
  - name: Deploy
    id: builddeploy
    uses: Azure/static-web-apps-deploy@v1
    with:          
      azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
      repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
      action: "upload"
      skip_app_build: true
      ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
      # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
      app_location: "/" # App source code path
      # api_location: "" # Api source code path - optional
      # output_location: "" # Built app content directory - optional
      ###### End of Repository/Build Configurations ######     

The way it is this workflow puts the files on:

www.mydomain.com/index.html (without en-US)

How can I fix that?

Igor Kondrasovas
  • 1,479
  • 4
  • 19
  • 36

2 Answers2

0

My solution was actually to configure docfx (docfx.json) to output site content to the folder I need (i.e _site/en-US/).

Then the upload will respect the folder structure.

It is more than a workaround, but I hope it helps.

Igor Kondrasovas
  • 1,479
  • 4
  • 19
  • 36
0

In the case of Azure Static Web Apps, this is not a supported feature. Deploying only occurs to the root folder.

OneClutteredMind
  • 369
  • 1
  • 3
  • 15