avab #4
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: CI / CD | |
on: [push,pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cd front; npm install; cd .. | |
- run: cd front; npm run build; cd .. | |
- run: npm install | |
- run : npx playwright install --with-deps | |
- run: npm start & | |
- run: npm test | |
deploy: | |
needs: [test] | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v2 | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GCP_SA_KEY_JSON }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: 'Use gcloud CLI' | |
run: 'gcloud info' | |
- run: cd front; npm install; cd .. | |
- run: cd front; npm run build; cd .. | |
- name: Deploy | |
run: gcloud app deploy |