Added Farsi test page and updated translation #407
Workflow file for this run
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
name: CI | |
on: | |
push: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- name: Install and update dependencies | |
run: yarn install --frozen-lockfile | |
- name: Lint code | |
run: yarn lint | |
- name: Build artifact | |
run: yarn build-cdn | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
deploy: | |
if: (github.ref_name == 'master' && github.event_name == 'push') || github.event_name == 'release' || github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[deploy]') | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-west-1 | |
- name: Set Prod artifact name | |
if: github.event_name == 'release' | |
run: echo "SIZEME_REACT_ARTIFACT=sizeme.js" >> $GITHUB_ENV | |
- name: Set QA artifact name | |
if: github.event_name != 'release' | |
run: echo "SIZEME_REACT_ARTIFACT=sizeme-test.js" >> $GITHUB_ENV | |
- name: Copy bundle and assets to Amazon S3 | |
run: | | |
aws s3 sync dist/ s3://sizeme-bucket/store --exclude sizeme.js --cache-control max-age=31536000,public --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers | |
aws s3 cp dist/sizeme.js s3://sizeme-bucket/store/$SIZEME_REACT_ARTIFACT --cache-control s-maxage=3600,max-age=1800,public --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers |