Skip to content

Commit

Permalink
Action to deploy to sandbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
YvetteWhiteUSDS committed Nov 8, 2024
1 parent a36ff2d commit 10a9ee7
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy-to-sandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Deploys the application to cloud.gov sandbox where this application is registered.
# The application

name: Deploy to cloud.gov Sandbox

on:
workflow_dispatch:
inputs:
cf-service-acct-username:
description: 'Cloud.gov service account username'
required: true
type: string
cf-service-acct-password:
description: 'Cloud.gov service account password'
required: true
type: string

jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Build code
run: |
npm ci
npm run build
- name: Install Cloud Foundry
run: curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=github" | tar -zx

- name: Deploy app to sandbox
env:
CF_USERNAME: ${{ github.event.inputs.cf-service-acct-username }}
CF_PASSWORD: ${{ github.event.inputs.cf-service-acct-password }}
run: |
./cf login -a api.fr.cloud.gov -u ${{ github.event.inputs.cf-service-acct-username }} -p ${{ github.event.inputs.cf-service-acct-password }}
# ./cf login -a api.fr.cloud.gov -u ${CF_USERNAME} -p ${CF_PASSWORD}
./cf push

0 comments on commit 10a9ee7

Please sign in to comment.