firebase init #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: cd movieverse && npm ci | |
- name: Set environment variables | |
run: | | |
echo "REACT_APP_API_SERVICE_GET_NOW_PLAYING_MOVIE_URL=${{ secrets.REACT_APP_API_SERVICE_GET_NOW_PLAYING_MOVIE_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_MOVIE_REVIEW_URL=${{ secrets.REACT_APP_API_SERVICE_GET_MOVIE_REVIEW_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_POPULAR_MOVIE_URL=${{ secrets.REACT_APP_API_SERVICE_GET_POPULAR_MOVIE_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_TREND_MOVIE_URL=${{ secrets.REACT_APP_API_SERVICE_GET_TREND_MOVIE_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_UPCOMING_MOVIE_URL=${{ secrets.REACT_APP_API_SERVICE_GET_UPCOMING_MOVIE_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_MOVIE_GENRE_URL=${{ secrets.REACT_APP_API_SERVICE_GET_MOVIE_GENRE_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_MOVIE_NAME_LIST_URL=${{ secrets.REACT_APP_API_SERVICE_GET_MOVIE_NAME_LIST_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_MOVIE_DETAILS_URL=${{ secrets.REACT_APP_API_SERVICE_GET_MOVIE_DETAILS_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_CAST_DETAILS_URL=${{ secrets.REACT_APP_API_SERVICE_GET_CAST_DETAILS_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_PRODUCTION_DETAILS_URL=${{ secrets.REACT_APP_API_SERVICE_GET_PRODUCTION_DETAILS_URL }}" >> $GITHUB_ENV | |
echo "REACT_APP_API_SERVICE_GET_RECOMMENDATION_DETAILS_URL=${{ secrets.REACT_APP_API_SERVICE_GET_RECOMMENDATION_DETAILS_URL }}" >> $GITHUB_ENV | |
- name: Build | |
run: cd movieverse && npm run build | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MOVIEVERSE_C1DC1 }} | |
channelId: live | |
projectId: movieverse-c1dc1 | |
entryPoint: "/home/runner/work/movie-verse/movie-verse/movieverse" |