Skip to content

publish returns message: Amplify Console hosting is not enabled. #27

@DiegoMcDipster

Description

@DiegoMcDipster

Hi,

I'm getting this strange message when running the amplify_command: publish.

amplify version 6.3.1
- Uploading files...
- Uploading files...
- Uploading files...
- Fetching updates to backend environment: dev from the cloud.
✔ Successfully pulled backend environment dev from the cloud.

    Current Environment: dev
    
┌──────────┬────────────────┬───────────┬─────────────────┐
│ Category │ Resource name  │ Operation │ Provider plugin │
├──────────┼────────────────┼───────────┼─────────────────┤
│ Hosting  │ amplifyhosting │ No Change │                 │
└──────────┴────────────────┴───────────┴─────────────────┘

No changes detected
Publish started for amplifyhosting
Amplify Console hosting is not enabled.  <-- on github this message is in red

The changes I made were to the Frontend. for example, changed the NextJs welcome heading to 'Welcome to CICD'. Note, I have enabled no api's yet. I'm just trying to get the workflow working.

The funny thing is that the job is completing successfully but the deploy isn't carried out.

Note, when setting the project up:

  • via the cli I ran: amplify add hosting
  • via Amplify console: i have toggled "Enable full-stack continuous deployments (CI/CD)" enabled/disabled. Neither worked
  • via Amplify console: I have enabled/disabled "Auto build" (App Settings > General > Branches > Main". If enabled the build and deploy runs without waiting for the github action.

It's a test repo/amplify env i've setup to get the CICD up and running, based on your 'Get stared' yml. This is my workflow file:

name: Deploy

on:
  push:
    branches: [main]

jobs:
  cypress-run:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Output about to run
        run: echo About to run the cypress script

      - name: Cypress run
        uses: cypress-io/github-action@v2
        with:
          build: npm run build
          start: npm run start

      - name: configure amplify
        uses: ambientlight/amplify-cli-action@0.3.0
        with:
          amplify_command: configure
          amplify_env: dev
          amplify_cli_version: "6.3.1"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: eu-central-1

      - name: deploy
        uses: ambientlight/amplify-cli-action@0.3.0
        with:
          amplify_command: publish
          amplify_env: dev
          amplify_cli_version: "6.3.1"
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: eu-central-1

Any ideas or advice?
That would be really appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions