feat: gradient header #12
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: Build and Deploy Client | |
on: | |
push: | |
branches: | |
- main | |
- "releases/**" | |
jobs: | |
build-dev: | |
if: ${{ github.ref != 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Make .env | |
run: | | |
touch ./.env.local | |
echo VITE_API_ENDPOINT=${{ vars.PUBLIC_API_ENDPOINT }} >> ./.env.local | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
build-stable: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
PUBLIC_URL: ${{ vars.PUBLIC_URL }} | |
GENERATE_SOURCEMAP: false | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Make .env | |
run: | | |
touch ./.env.local | |
echo VITE_API_ENDPOINT=${{ vars.PUBLIC_API_ENDPOINT }} >> ./.env.local | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Deploy | |
uses: reggionick/s3-deploy@v3 | |
with: | |
folder: dist | |
bucket: ${{ vars.S3_BUCKET_PRODUCTION }} | |
bucket-region: ${{ vars.S3_BUCKET_REGION }} | |
dist-id: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID_PRODUCTION }} | |
no-cache: true | |
private: true |