Deploy to app engine (public dev env) #41
This file contains hidden or 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 app engine (public dev env) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| VITE_MAPTILER_API_KEY: '${{ secrets.MAPTILER_API_KEY }}' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18.x | |
| cache: 'npm' | |
| - name: Install wasm-pack | |
| uses: jetli/wasm-pack-action@v0.4.0 | |
| - name: Build | |
| run: | | |
| npm ci | |
| npm run setup-govuk | |
| VITE_RESOURCE_BASE="https://dev.plan.activetravelengland.gov.uk/data" npm run build | |
| cd backend | |
| rm -rf dist | |
| cp -R ../dist . | |
| - name: Authenticate to GCP | |
| uses: google-github-actions/auth@v1 | |
| with: | |
| credentials_json: '${{ secrets.GCP_PUBLIC_DEV_CREDENTIALS }}' | |
| - name: Deploy | |
| uses: google-github-actions/deploy-appengine@v1 | |
| with: | |
| project_id: ${{ vars.PROJECT_ID }} | |
| deliverables: backend/app_public_dev.yaml |