Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit b242d75

Browse files
authored
Merge pull request #148 from silinternational/develop
Release 3.1.1 - GitHub Actions
2 parents a5c186d + 2962dd2 commit b242d75

File tree

7 files changed

+36
-72
lines changed

7 files changed

+36
-72
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test and Deploy
2+
3+
on:
4+
push:
5+
6+
env:
7+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
8+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
9+
10+
jobs:
11+
test_and_deploy:
12+
name: Test and Deploy
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18.x'
20+
- name: Test
21+
run: |
22+
npm install --no-fund -g [email protected]
23+
npm ci --no-fund
24+
npm test
25+
serverless --version
26+
serverless info --conceal
27+
- if: github.ref_name == 'develop'
28+
run: serverless deploy --verbose --stage dev --region us-east-1
29+
- if: github.ref_name == 'develop'
30+
run: serverless deploy --verbose --stage dev --region us-west-2
31+
- if: github.ref_name == 'main'
32+
run: serverless deploy --verbose --stage prod --region us-east-1
33+
- if: github.ref_name == 'main'
34+
run: serverless deploy --verbose --stage prod --region us-west-2

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Serverless API for registering and validating Multi-Factor Authentication meth
44
Currently supports Time-based One Time Passwords (TOTP) and FIDO U2F devices (YubiKeys).
55

66
For details about the various API endpoints, see
7-
[the RAML file](https://github.com/silinternational/serverless-mfa-api/blob/master/api.raml).
7+
[the RAML file](https://github.com/silinternational/serverless-mfa-api/blob/main/api.raml).
88

99
## Basic Workflow
1010

@@ -73,21 +73,6 @@ For details about the various API endpoints, see
7373
must be HTTPS. It does not need the full path though, so https://myapp.com is sufficient if the page is at
7474
https://myapp.com/auth/login.
7575

76-
## Continuous Integration / Continuous Deployment (CI/CD)
77-
78-
To set this up on Codeship, do the following:
79-
80-
- Create a Codeship Basic project.
81-
- Give it a Setup Command of `./codeship/setup.sh`
82-
- Give it a Test Command of `./codeship/test.sh`
83-
- Create a Deployment Pipeline for the `develop` branch with this command:
84-
`./codeship/deploy-dev.sh`
85-
- Create a Deployment Pipeline for the `master` branch with this command:
86-
`./codeship/deploy-prod.sh`
87-
- Provide `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
88-
with the credentials of the AWS IAM user that Serverless (running on Codeship)
89-
should act as when deploying this API.
90-
9176
## Automated Backups ##
9277
While DynamoDB supports On Demand backups as well as Continuous Backups with
9378
Point-in-time Recovery (PITR), both of these methods [restore to a new
@@ -328,7 +313,7 @@ terraform taint module.serverless-user.aws_iam_access_key.serverless
328313
```
329314
2. Run a new plan on Terraform Cloud
330315
3. Review the new plan and apply if it is correct
331-
4. Copy the new key and secret from the Terraform output into Codeship
316+
4. Copy the new key and secret from the Terraform output into GitHub Repository Secrets
332317
333318
## Glossary
334319

codeship/deploy.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

codeship/setup.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

codeship/test.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"dependencies": {
55
"aws-sdk": "^2.1039.0",
66
"bcryptjs": "^2.4.3",
7-
"crypto-js": "^3.3.0",
87
"qrcode": "^0.9.0",
98
"speakeasy": "^2.0.0",
109
"u2f": "^0.1.3",

0 commit comments

Comments
 (0)