Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .git-crypt/.gitattributes

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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
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 }}
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

10 changes: 0 additions & 10 deletions Gemfile

This file was deleted.

Loading