Skip to content

Required Tags field on Questionnaires #406

Required Tags field on Questionnaires

Required Tags field on Questionnaires #406

Workflow file for this run

name: ci
on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch: ~
jobs:
build-and-test:
name: Build and Test App
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.18.0
- name: Install dependencies
run: npm ci
- name: Run Linter
run: npm run lint
- name: Run Tests
run: npm test
- name: Build project
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-debug
path: build
retention-days: 1
build-prod:
name: Build Production App
if: github.ref == 'refs/heads/master'
needs: build-and-test
runs-on: ubuntu-latest
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Remove previous branding folder
run: rm -rf ./src/branding
- name: Checkout branding repository
uses: actions/checkout@v3
with:
repository: impactasaurus/branding
token: ${{ secrets.BRANDING_PERSONAL_ACCESS_TOKEN }}
path: ./src/branding
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.18.0
- name: Install dependencies
run: npm ci
- name: Extract source text
run: npm run i18n-extract && npm run i18n-push
- name: Download translations
run: npm run i18n-pull
- name: Generate Production Files
run: npm run build:prod
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-prod
path: build
retention-days: 30
deploy:
name: Deploy App
if: github.ref == 'refs/heads/master'
needs: build-prod
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-prod
path: dist
- name: Deploy app to S3
uses: reggionick/s3-deploy@v3
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /
delete-removed: false
private: true