Skip to content

Commit

Permalink
Merge pull request #159 from BuckinghamAJ/dev
Browse files Browse the repository at this point in the history
Testing Github Actions to auto deploy to cloud.gov
  • Loading branch information
BuckinghamAJ authored May 20, 2024
2 parents 5d162fd + 775b700 commit 83e5e4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
name: Deploying to Cloud.gov
runs-on: ubuntu-latest
needs: docker
env:
LOGIN_PRIVATE_KEY: |
${{ secrets.LOGIN_PRIVATE_DEV_KEY }}
steps:
-
name: Checkout
Expand Down
7 changes: 6 additions & 1 deletion server/routes/auth.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ const CO_ROLE = 3
const EXEC_ROLE = 4

// Load your RSA private key
const privateKey = fs.readFileSync(path.resolve(__dirname,'../certs/private.pem'), 'utf8');
let privateKey;
try {
privateKey = fs.readFileSync(path.resolve(__dirname,'../certs/private.pem'), 'utf8');
} catch (err) {
privateKey = process.env.LOGIN_PRIVATE_KEY;
}
const publicKey = fs.readFileSync(path.resolve(__dirname,'../certs/public.crt'), 'utf8');
/**
* Update a user record in the database to reflect updated info from MAX CAS
Expand Down

0 comments on commit 83e5e4a

Please sign in to comment.