Skip to content
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

Problem deploying with Github actions #211

Open
patbranchaud opened this issue Apr 5, 2023 · 0 comments
Open

Problem deploying with Github actions #211

patbranchaud opened this issue Apr 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@patbranchaud
Copy link

patbranchaud commented Apr 5, 2023

Describe the Bug

Hey,

maybe you can help, but I know it's not directly related to your script but I'm not sure were to start.
I have a sveltkit / tailwindcss / github / firebase app that I am trying make work
and I'm using the svelte-adapter-firebase

Problem is

  • When I build locally npm run build and deploy firebase deploy online from my computer to hosting It works perfectly fine
  • When I build and deploy using github action yml trigerred on merge the app is broken.
    I'm getting multiple 404 in browser console and cloud logging :

Capture d’écran, le 2023-04-05 à 09 45 04

It's like some of the app files is still referring to the files created by the build I've done locally.
They are not replaced by the new files
Could it be because the github action is not updating the ssr function?

Can you point me in the right direction to fix this?
Let me know if I'm not clear.

Thank you!

Steps to Reproduce

// import adapter from '@sveltejs/adapter-auto';
import firebase from 'svelte-adapter-firebase';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: firebase()
	},
	preprocess: vitePreprocess()
};

export default config;
# The github action file :
name: Deploy to Firebase Hosting on merge
'on':
  push:
    branches:
      - main
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: npm ci
      - run: npm run build
      - name: Check build output
        run: ls -la build
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: '${{ secrets.MY_GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.MY_FIREBASE_SERVICE_ACCOUNT }}'
          channelId: live
          projectId: myprojectId

Expected Behaviour

no 404

svelte-adapter-firebase version

^0.15.0

sveltejs/kit version

^1.0.0-next.587

@patbranchaud patbranchaud added the bug Something isn't working label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant