Skip to content

1252 Link to New Project Form from Projects Page #55

1252 Link to New Project Form from Projects Page

1252 Link to New Project Form from Projects Page #55

Workflow file for this run

name: 🎭 Deploy to staging
on:
push:
branches:
- main
jobs:
test-client:
name: 🧪 Test client code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: client
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive
working-directory: client
- name: build
env:
DISABLE_SOURCE_MAPS: true
BROCCOLI_ENV: production
run: yarn build
working-directory: client
- name: test
run: yarn test
working-directory: client
deploy-server:
name: 🚀 Deploy server
needs: test-client
environment:
name: staging
url: https://staging-applicants-api.nycplanningdigital.com
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
sparse-checkout: server
- uses: akhileshns/[email protected]
name: Deploy server to Heroku
with:
heroku_email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ vars.HEROKU_APP_NAME }}
team: ${{ secrets.HEROKU_TEAM }}
appdir: server
env:
HD_FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }}
HD_ADO_PRINCIPAL: ${{ secrets.ADO_PRINCIPAL }}
HD_AUTHORITY_HOST_URL: ${{ secrets.AUTHORITY_HOST_URL }}
HD_CLIENT_ID: ${{ secrets.CLIENT_ID }}
HD_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
HD_CRM_HOST: ${{ secrets.CRM_HOST }}
HD_CRM_SERVICE_CONTACT_ID: ${{ secrets.CRM_SERVICE_CONTACT_ID }}
HD_CRM_URL_PATH: ${{ secrets.CRM_URL_PATH }}
HD_FIXIE_URL: ${{ secrets.FIXIE_URL }}
HD_NODE_ENV: ${{ vars.NODE_ENV }}
HD_NYCID_SERVICE_ACCOUNT_USERNAME: ${{ secrets.NYCID_SERVICE_ACCOUNT_USERNAME }}
HD_NYCID_TOKEN_SECRET: ${{ secrets.NYCID_TOKEN_SECRET }}
HD_PAPERTRAIL_API_TOKEN: ${{ secrets.PAPERTRAIL_API_TOKEN }}
HD_RER_FILETYPE_UUID: ${{ secrets.RER_FILETYPE_UUID }}
HD_SHAREPOINT_CLIENT_ID: ${{ secrets.SHAREPOINT_CLIENT_ID }}
HD_SHAREPOINT_CLIENT_SECRET: ${{ secrets.SHAREPOINT_CLIENT_SECRET }}
HD_SHAREPOINT_CRM_SITE: ${{ secrets.SHAREPOINT_CRM_SITE }}
HD_SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }}
HD_SHAREPOINT_TARGET_HOST: ${{ secrets.SHAREPOINT_TARGET_HOST }}
HD_TENANT_ID: ${{ secrets.TENANT_ID }}
HD_TOKEN_PATH: ${{ secrets.TOKEN_PATH }}
HD_ZAP_TOKEN_SECRET: ${{ secrets.ZAP_TOKEN_SECRET }}
deploy-client:
name: 🛫 Deploy client
needs: [test-client, deploy-server]
environment:
name: staging
url: https://staging.applicant-portal.planninglabs.nyc
runs-on: ubuntu-latest
env:
FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }}
HOST: ${{ vars.ZAP_API_HOST }}
MAINTENANCE_START: ${{ vars.MAINTENANCE_START }}
MAINTENANCE_END: ${{ vars.MAINTENANCE_END }}
NYCID_CLIENT_ID: ${{ vars.NYCID_CLIENT_ID }}
NYCID_DOMAIN: ${{ vars.NYCID_DOMAIN }}
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
sparse-checkout: client
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 12.x
- name: Install application dependencies
working-directory: client
run: yarn install
- name: Build client
working-directory: client
run: yarn run build --environment=production
- name: Install netlify
# Use npm over yarn because yarn was not respecting the exact version of a dependency
run: npm i -g [email protected]
- name: Deploy client to Netlify
run: |
netlify deploy \
--dir client/dist \
--alias staging \
--site ${{secrets.NETLIFY_SITE_ID}} \
--auth ${{secrets.NETLIFY_AUTH_TOKEN}} \
--message "${{ github.event.head_commit.message }}"