Merge branch 'development' of https://github.com/flojud/Kindergarten-… #21
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
# This file was auto-generated by the Firebase CLI | |
# https://github.com/firebase/firebase-tools | |
name: Deploy to Firebase Hosting on merge | |
'on': | |
push: | |
branches: | |
- development | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: git fetch --prune --prune-tags --unshallow --tags --force | |
- name: Check for Version Bump | |
run: | | |
if [[ "${{github.event.head_commit.message}}" == *"Version Bump"* ]]; then | |
echo "Version Bump detected" | |
exit 1 | |
fi | |
- name: Use Node.js 18.18.2 | |
uses: actions/setup-node@v3 | |
- name: Create Firebase-Config | |
run: | | |
echo "${{ secrets.FIREBASE_CONFIG }}" > src/firebase/config.tsx | |
shell: bash | |
- name: Version bump | |
run: | | |
npm i | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
if ! [ -x "$(command -v grunt)" ]; then | |
npm i -g grunt-cli | |
fi | |
grunt bump:patch | |
- name: Build project | |
shell: 'bash' | |
run: | | |
npm ci --omit=dev --ignore-scripts | |
npm run build | |
- uses: FirebaseExtended/[email protected] | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KINDERGARTEN_TIMETRACKER }}' | |
channelId: live | |
projectId: kindergarten-timetracker |