Skip to content

Commit

Permalink
chore: deploy landing page and game in staging and prod (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsgalarraga authored Jun 12, 2024
1 parent 1a7bf1c commit 93cc31a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/deploy_app_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,37 @@ jobs:
name: Deploy App Production
steps:
- uses: actions/checkout@v4

- name: Setup Node.js runtime environment
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Build landing page
run: |
cd landing
yarn install
yarn build
cd ..
- uses: subosito/flutter-action@v2
with:
channel: beta
flutter-version: 3.23.0-0.1.pre
- run: flutter packages get
- run: flutter build web -t lib/main_production.dart --dart-define CROSSWORD_URL=${{ env.CROSSWORD_URL }} --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY_PROD }} --wasm

- name: Move build files to public folder
run: |
mkdir public
mkdir public/game
cp -a build/web/index.html public/game/index.html
cp -a build/web/* public/
cp -a landing/dist/index.html public/index.html
cp -a landing/dist/assets/* public/assets/
- uses: FirebaseExtended/action-hosting-deploy@v0
- name: Deploy landing page and game to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}"
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/deploy_app_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,37 @@ jobs:
name: Deploy App Staging
steps:
- uses: actions/checkout@v4

- name: Setup Node.js runtime environment
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Build landing page
run: |
cd landing
yarn install
yarn build
cd ..
- uses: subosito/flutter-action@v2
with:
channel: beta
flutter-version: 3.23.0-0.1.pre
- run: flutter packages get
- run: flutter build web -t lib/main_staging.dart --dart-define CROSSWORD_URL=${{ env.CROSSWORD_URL }} --dart-define RECAPTCHA_KEY=${{ secrets.RECAPTCHA_KEY }} --wasm

- name: Move build files to public folder
run: |
mkdir public
mkdir public/game
cp -a build/web/index.html public/game/index.html
cp -a build/web/* public/
cp -a landing/dist/index.html public/index.html
cp -a landing/dist/assets/* public/assets/
- uses: FirebaseExtended/action-hosting-deploy@v0
- name: Deploy landing page and game to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}"
Expand Down

0 comments on commit 93cc31a

Please sign in to comment.