-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from scpwiki/deploy
Update deployment for attribution-metadata
- Loading branch information
Showing
19 changed files
with
79 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Web Build' | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/web-check.yaml' | ||
- 'web/**' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Node.js Setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: NPM Dependencies | ||
run: cd web && npm ci | ||
|
||
- name: NPM Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('web/package.json') }} | ||
|
||
- name: Build app | ||
run: cd web && npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## attribution-metadata API | ||
|
||
This is the backend Lambda service which serves attribution-metadata requests, reading and writing the data from DynamoDB. | ||
|
||
### Deployment | ||
|
||
Locally, you can verify that your code builds in the usual way: | ||
``` | ||
cargo check | ||
``` | ||
|
||
The most convenient way to produce artifacts that can be deployed to Lambda is using the [AWS Lambda Rust Runtime](https://github.com/awslabs/aws-lambda-rust-runtime). Using the `cargo lambda` subcommand: | ||
``` | ||
cargo lambda build --release --arm64 --output-format zip | ||
``` | ||
|
||
We target the ARM architecture because we are not using anything specific to x64, and ARM is cheaper and generally more power-efficient. | ||
|
||
The resultant ZIP file (found in `target/lambda/attribution-metadata`) can be uploaded to Lambda via the [console](https://us-east-2.console.aws.amazon.com/lambda/home?region=us-east-2#/functions/AttributionMetadataService). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters