diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f922e6d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: CI +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + cd hosting + echo "REACT_APP_ENV=production" >> .env + npm ci + npm run build + + deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + needs: + - build + steps: + - uses: actions/checkout@v3 + - run: npx firebase-tools deploy --token $FIREBASE_TOKEN diff --git a/hosting/src/components/pages/HomePage.tsx b/hosting/src/components/pages/HomePage.tsx index 8ca3062..8a95bc2 100644 --- a/hosting/src/components/pages/HomePage.tsx +++ b/hosting/src/components/pages/HomePage.tsx @@ -17,7 +17,7 @@ export function HomePage() { setRepositories(repos); })(); - }, [user]); + }, [user, request]); return (