build: add more files to GH actions to ignore #191
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: | |
- master | |
# Since this action only deploys the front-end SvelteKit SPA | |
# backend resources can be ignored. | |
paths-ignore: | |
# An updated backend shouldn't trigger deploys | |
- api/** | |
# We don't have automated Firestore rules deploys yet. | |
- firestore* | |
# Updated docs shouldn't trigger deploys | |
- docs/** | |
- README.md | |
- CONTRIBUTING.md | |
- SECURITY.md | |
# We don't have automated front-end tests. | |
- tests | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
VITE_FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}} | |
VITE_FIREBASE_AUTH_DOMAIN: ${{secrets.FIREBASE_AUTH_DOMAIN}} | |
VITE_FIREBASE_DATABASE_URL: ${{secrets.FIREBASE_DATABASE_URL}} | |
VITE_FIREBASE_PROJECT_ID: ${{secrets.FIREBASE_PROJECT_ID}} | |
VITE_FIREBASE_STORAGE_BUCKET: ${{secrets.FIREBASE_STORAGE_BUCKET}} | |
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{secrets.FIREBASE_MESSAGING_SENDER_ID}} | |
VITE_FIREBASE_VAPID_PUBLIC_KEY: ${{vars.FIREBASE_VAPID_PUBLIC_KEY}} | |
VITE_FIREBASE_APP_ID: ${{secrets.FIREBASE_APP_ID}} | |
VITE_FIREBASE_MEASUREMENT_ID: ${{secrets.FIREBASE_MEASUREMENT_ID}} | |
VITE_FIREBASE_APP_CHECK_PUBLIC_KEY: ${{vars.FIREBASE_APP_CHECK_PUBLIC_KEY}} | |
VITE_MAPBOX_ACCESS_TOKEN: ${{secrets.MAPBOX_ACCESS_TOKEN}} | |
VITE_THUNDERFOREST_API_KEY: ${{secrets.THUNDERFOREST_API_KEY}} | |
VITE_DIRECT_TRAIN_API_URLS: ${{secrets.DIRECT_TRAIN_API_URLS}} | |
VITE_DB_TRANSPORT_REST_API_URLS: ${{secrets.DB_TRANSPORT_REST_API_URLS}} | |
VITE_STATIC_ASSETS_BUCKET: https://storage.googleapis.com/wtmg-static | |
VITE_STRIPE_PUBLISHABLE_KEY: ${{secrets.STRIPE_PUBLISHABLE_KEY}} | |
VITE_STRIPE_PRICE_ID_REDUCED: ${{secrets.STRIPE_PRICE_ID_REDUCED}} | |
VITE_STRIPE_PRICE_ID_NORMAL: ${{secrets.STRIPE_PRICE_ID_NORMAL}} | |
VITE_STRIPE_PRICE_ID_SOLIDARITY: ${{secrets.STRIPE_PRICE_ID_SOLIDARITY}} | |
VITE_DISCOURSE_HOST: ${{vars.DISCOURSE_HOST}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/prepare-source | |
with: | |
credentials_json: ${{secrets.GCP_CREDENTIALS}} | |
- name: Build project | |
run: yarn run build:prod | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_WTMG_PRODUCTION }}" | |
channelId: live | |
projectId: wtmg-production | |
target: production |