Skip to content

Commit

Permalink
rename old deploy files and add public dev deploy workflow (#528)
Browse files Browse the repository at this point in the history
* rename old deploy files and add public dev deploy workflow

* Still need to fill the bucket but important to set project number

---------

Co-authored-by: Peter York <peter.york@dft.gov.uk>
  • Loading branch information
Pete-Y-CS and Peter York authored Oct 22, 2024
1 parent b575126 commit fce1663
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to app engine (dev env)
name: Deploy to app engine (internal dev env)

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to app engine (test env)
name: Deploy to app engine (internal test env)

on:
push:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/deploy_public_appengine_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy to app engine (public dev env)

on:
push:
branches:
- main

env:
PROJECT_ID: dft-rlg-schemes-gis-dev

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://${PROJECT_ID}.ew.r.appspot.com/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_DEV_CREDENTIALS }}'

- name: Deploy
uses: google-github-actions/deploy-appengine@v1
with:
project_id: ${{ vars.PROJECT_ID }}
deliverables: backend/app_dev_public.yaml
4 changes: 4 additions & 0 deletions backend/app_dev_public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
runtime: nodejs18
env_variables:
GCS_BUCKET: "dft-rlg-atip-dev"
PROJECT_NUMBER: "237643263862"

0 comments on commit fce1663

Please sign in to comment.