use new secret #155
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
event-type: deploy | |
repository: ${{ secrets.KUBERNETES_REPO_NAME }} | |
client-payload: '{"repository": "${{ github.repository }}", "sha": "${{ github.sha }}", "image_name": "pandemic-server"}' | |
- name: Build Common | |
working-directory: ./PandemicCommon | |
run: | | |
npm ci | |
npm run build | |
- name: Test Server | |
working-directory: ./PandemicServer | |
run: | | |
npm ci | |
npm run check | |
npm run test:cloudbuild | |
# npm run build | |
- name: Build Client | |
working-directory: ./pandemic-react | |
run: | | |
npm ci | |
npm run check | |
npm run test:cloudBuild | |
npm run build | |
- name: Deploy Client | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only hosting | |
env: | |
PROJECT_PATH: ./pandemic-react | |
PROJECT_ID: default | |
FIREBASE_TOKEN: ${{ secrets.GCP_SA_KEY }} |