-
Notifications
You must be signed in to change notification settings - Fork 63
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
NuxtUI Pro will not deploy to NuxtHub #430
Comments
If you're on GitHub's free tier, we can't sync environment variables or secrets from NuxtHub Admin to GitHub since GitHub environments are only available on their paid plans. You can add a repository secret called EDIT: Clarified limitation from GitHub |
I suggest this issue be re-opened. Reasons:
I would be interested to learn whether @ratracegrad was able to overcome this obstacle? It looks like @RihanArfan quickly closed the issue without learning whether the advice was actionable. |
Hi @DavidSabine, thank you for raising these points. I understand the current requirement requiring updating your GitHub Actions workflow file to reference secrets isn't ideal at all and we're investigating ways to improve this. We have a guide for using GitHub secrets during build time on our docs - it requires making a modification to your workflow file to utilise the GitHub secret. https://hub.nuxt.com/docs/getting-started/deploy#environment-variables-secrets. If your repo is on a free GitHub account/org, you'll need to follow the steps in my previous reply to set the secret too. Otherwise, setting/updating the secret from NuxtHub Admin will set the secret on GitHub. It should definitely be possible to deploy Nuxt UI Pro without hardcoding the secret inside your code. In order to investigate your deployment problem, please could you share your GitHub Actions workflow file and I'll take a look. |
Hello @RihanArfan, My repo is on a free GitHub account, yes. I read the doc at /docs/getting-started/deploy#env...:: I then:
You can see VSCode doesn't like the syntax in the yml file - but more importantly, it fails to deploy whether I use |
Hmm this is certainly very strange. Your workflow file and secret name appear to be correct. Just to confirm, is the secret under Actions? Also, could you double check the license key is correct? You can test the license key by setting I've tested deploying a Nuxt UI Pro template from scratch successfully.
.github/workflows/nuxthub.yml
name: Deploy to NuxtHub
on: push
jobs:
deploy:
name: "Deploy to NuxtHub"
runs-on: ubuntu-latest
environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build application
run: pnpm build
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1
id: deploy
with:
project-key: nuxt-ui-pro-nux-nvtb |
Hi @RihanArfan, There were 2 problems in my realm:
All is working now. Conversation with you was helpful. Much appreciated. |
Had the same issue. During setup on admin.hub.nuxt.com I did add the env variable, but still got the error. had to manually add the variable to the repository and edit the workflow file. Thanks @DavidSabine I used nuxt hub before, and I didn't had this issue. Just now when it moved to use GH Actions. |
I have deployed my app multiple times to NuxtHub. I have added NuxtUI Pro. It will not deploy because of my NuxtUIPro is not being read.
My NuxtUI Pro license is validated.
I have updated my nuthub.yml file to be:
In my NuxtHub admin in Environments I have my
NUXT_UI_PRO_LICENSE
and it is deplyed as you can see in this screenshot:The
Deploy to NuxtHub
task fails with:The text was updated successfully, but these errors were encountered: