.well-known stripped from deployed builds

Hello, when building our React site locally the .well-known folder is present in the build folder. When deploying via a Github action the .well-known is no longer present, which breaks our universal links. This used to work AFAIK, did anything change?

Site: https://longangle-test.com/

name: Helper - deploy frontend

on:
workflow_call:
inputs:
LA_ENVIRONMENT:
required: true
type: string
ARTIFACT_NAME:
required: true
type: string
secrets:
NETLIFY_AUTH_TOKEN:
required: true
NETLIFY_SITE_ID:
required: true

jobs:
test-frontend:
uses: ./.github/workflows/frontend-unit-tests.yml

build-web:
uses: ./.github/workflows/web-build.yml
with:
LA_ENVIRONMENT: ${{ inputs.LA_ENVIRONMENT }}
ARTIFACT_NAME: ${{ inputs.ARTIFACT_NAME }}

deploy-web-client:
needs: [test-frontend, build-web]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@master
with:
name: ${{ inputs.ARTIFACT_NAME }}
path: web-client/build

  - name: deploy
    uses: nwtgck/actions-netlify@v3.0
    with:
      publish-dir: web-client/build
      deploy-message: "Deployed frontend via GitHub Actions"
      production-deploy: true
    env:
      NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
      NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

You can deploy it as well-known and add Netlify Rewrites:

/.well-known/* /well-known/:splat 200!

Sure, but why did this stop working? On deploy 66cff96f59fbfd8c49c0197d it was working fine (August 28) and then the following deploy 66d08dfe349c93356497fb19 (August 29) it was no longer working, despite no changes in our dependencies or our deployment code/process.

You’re using a 3rd party action to deploy. Can’t say for specific what changed with a 3rd party setup.

What’s the first party supported way of deploying via Github?

You can directly use Netlify CLI.

Our workflow depends a lot on other Github actions finishing first, so we’d like to have a way of triggering a deploy once those pass.

Not sure if I understand… You’re currently using a 3rd party script and that’s working well (except for this .well-known issue). Replacing that with Netlify CLI would not work? Any particular reason?

OK I will try to update our action. Using the netlify-cli will .well-known get included without any workaround?

I’m not sure, that’s something to try. For a long time we were not uploading folders starting with .. Past threads for reference:

However, I believe at some point (not sure when), we started allowing .well-known folder (at least). I never saw this change being announced (even internally), I just found out about it by inspecting some sites while troubleshooting them.

All this to say, switching to Netlify CLI might or might not solve the issue. However, once you switch, we can at least officially provide support and accept bug reports for unexpected behaviour.

1 Like

Based on the code: cli/src/commands/deploy/deploy.ts at main · netlify/cli (github.com), I can confirm the expected behaviour is to upload that folder.

I have deployed using the netlify-cli and .well-known is still getting stripped: 66d38c27b15368815437f830

I think I’ve narrowed it down to an issue on our end, thank you for your help @hrishikesh

For anyone else looking, this was the issue:

1 Like