Revisar aplicação de timeouts na comunicação com os robôs #85
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: Build and Deploy Dashboard | |
on: pull_request | |
jobs: | |
setup: | |
name: Setup environment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch | |
id: branch_check | |
run: | | |
echo "Running on branch ${{ github.ref }}" | |
if [ "${{ github.ref_name }}" = "master" ]; then | |
echo "::set-output name=env_name::PROD" | |
elif [ "${{ github.ref_name }}" != "master" ]; then | |
echo "::set-output name=env_name::STAGE" | |
fi | |
outputs: | |
env_name: ${{ steps.branch_check.outputs.env_name }} | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [setup] | |
environment: ${{ needs.setup.outputs.env_name }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build Dashboard | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
AUTH_DOMAIN: ${{ secrets.AUTH_DOMAIN }} | |
DATA_BASE_URL: ${{ secrets.DATA_BASE_URL }} | |
PROJECT_ID: ${{ secrets.PROJECT_ID }} | |
STORAGE_BUCKET: ${{ secrets.STORAGE_BUCKET }} | |
MESSAGING_SENDER_ID: ${{ secrets.MESSAGING_SENDER_ID }} | |
APP_ID: ${{ secrets.APP_ID }} | |
GH_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }} | |
GH_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }} | |
OAUTH_REDIRECT_URI: ${{ secrets.OAUTH_REDIRECT_URI }} | |
run: npx quasar build -m pwa | |
- name: Archive Production Artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: dist | |
path: dist | |
deploy: | |
name: "Deploy em Canal de ${{ needs.setup.outputs.env_name }}" | |
needs: [setup, build] | |
runs-on: ubuntu-latest | |
environment: ${{ needs.setup.outputs.env_name }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Download Artifact | |
uses: actions/download-artifact@master | |
with: | |
name: dist | |
path: dist | |
# - name: Deploy to Firebase | |
# uses: w9jds/firebase-action@master | |
# with: | |
# args: hosting:channel:deploy pr${{ github.event.pull_request.number}}-${{ github.head_ref}} | |
# env: | |
# GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | |
# PROJECT_ID: ${{ secrets.PROJECT_ID}} | |
- name: Deploy to Firebase | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.GCP_SA_KEY }}" | |
expires: 30d | |
projectId: ${{ secrets.PROJECT_ID}} |