-
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 #488 from bosonprotocol/demo
Migrate to GH Actions and EKS
- Loading branch information
Showing
68 changed files
with
65 additions
and
3,824 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-471 Bytes
.git-crypt/keys/default/0/04ED20CFC7112DE4E6C4070CED0E3AA9A664E742.gpg
Binary file not shown.
Binary file removed
BIN
-727 Bytes
.git-crypt/keys/default/0/2CBCDE40E6B92375882CAF869801BFBDC5D7F579.gpg
Binary file not shown.
Binary file removed
BIN
-471 Bytes
.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg
Binary file not shown.
Binary file removed
BIN
-727 Bytes
.git-crypt/keys/default/0/855982A11F55E25E97210243CC6B9299734DD558.gpg
Binary file not shown.
Binary file removed
BIN
-727 Bytes
.git-crypt/keys/default/0/B14145CFE7938B456B337E514F2AE1DED258B20E.gpg
Binary file not shown.
Binary file removed
BIN
-471 Bytes
.git-crypt/keys/default/0/CF76184B551B037240C4D457AFD792BACA20583D.gpg
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build and Deploy leptonite.io | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-test: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12' | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run app:lint | ||
- run: npm run app:format | ||
- run: npm run tests:lint | ||
- run: npm run tests:format | ||
- run: npm run tests:unit:coverage | ||
- run: npm run tests:coverage:badge | ||
|
||
deploy: | ||
name: Publish to CDN | ||
runs-on: ubuntu-latest | ||
needs: [build-and-test] | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12' | ||
cache: 'npm' | ||
- run: npm install | ||
- name: Build content | ||
id: build | ||
run: npm run build | ||
env: | ||
NODE_ENV: production | ||
REACT_APP_BACKEND_BASE_URL: https://api.leptonite.io | ||
REACT_APP_FRONT_END_LOCALSTORAGE_VERSION: 1.0 | ||
CONTENT_WORK_DIRECTORY: build/content | ||
GENERATE_SOURCEMAP: false | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-2 | ||
- id: install-aws-cli | ||
uses: unfor19/install-aws-cli-action@v1 | ||
with: | ||
version: 2 | ||
- run: aws s3 sync ./build/content s3://$BUCKET --delete | ||
env: | ||
BUCKET: ${{ secrets.S3_CONTENT_BUCKET }} | ||
- run: aws cloudfront create-invalidation --distribution-id $CDN_ID --paths "/*" | ||
env: | ||
CDN_ID: ${{ secrets.CDN_ID }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.