Now loading the thumbnail before loading the full version in asset view. #81
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: Frontend Deploy | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- frontend/** | |
- packages/user-interface/** | |
workflow_dispatch: | |
jobs: | |
deploy: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{github.sha}} | |
AUTH0_DOMAIN: ${{secrets.AUTH0_DOMAIN}} | |
AUTH0_CLIENT_ID: ${{secrets.AUTH0_CLIENT_ID}} | |
AUTH0_AUDIENCE: ${{secrets.AUTH0_AUDIENCE}} | |
GOOGLE_API_KEY: ${{secrets.GOOGLE_API_KEY}} | |
BASE_URL: ${{secrets.AUTH0_DOMAIBASE_URL}} | |
NODE_ENV: development | |
AUTH0_ORIGIN: ${{secrets.AUTH0_ORIGIN}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8.15.5 | |
# - name: Get pnpm cache directory | |
# id: pnpm-cache-dir | |
# run: echo "::set-output name=dir::$(pnpm cache dir)" | |
# - name: Cache pnpm modules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ steps.pnpm-cache-dir.outputs.dir }} | |
# key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm- | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Compile code | |
run: pnpm run compile | |
- name: Build frontend | |
env: | |
NODE_ENV: production | |
working-directory: frontend | |
run: pnpm run build | |
- name: Create version file | |
working-directory: frontend | |
run: | | |
echo "{ \"version\": \"${VERSION}\" }" > ./dist/version.json | |
# | |
# Configures the AWS cli. | |
# | |
- name: Set AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID}} | |
aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
aws-region: ${{secrets.AWS_REGION}} | |
# | |
# Deploys to static web page to s3. | |
# | |
- name: Deploy to S3 | |
working-directory: frontend | |
run: aws s3 cp ./dist s3://${{secrets.FRONTEND_S3_BUCKET}}/ --recursive | |