update ui #135
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: Gnocchi Deploy | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'apps/gnocchi/**' | |
- 'packages/client/**' | |
- 'packages/apps/**' | |
- '.github/workflows/deploy-gnocchi.yml' | |
jobs: | |
build-and-deploy-gnocchi: | |
name: Build and deploy gnocchi | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8.12.1 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --filter @gnocchi.biscuits/web... | |
- name: Build gnocchi | |
run: pnpm --filter @gnocchi.biscuits/web... run build | |
env: | |
VITE_API_ORIGIN: ${{ vars.API_ORIGIN }} | |
VITE_HOME_ORIGIN: ${{ vars.HOME_ORIGIN }} | |
VITE_PUBLIC_URL: https://gnocchi.biscuits.club | |
VITE_STRIPE_PUBLISHABLE_KEY: ${{ vars.STRIPE_PUBLISHABLE_KEY }} | |
- name: Deploy gnocchi to S3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET_GNOCCHI }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYER_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYER_AWS_SECRET_ACCESS_KEY }} | |
SOURCE_DIR: './apps/gnocchi/web/dist' | |
- name: Invalidate CloudFront cache | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYER_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYER_AWS_SECRET_ACCESS_KEY }} | |
DISTRIBUTION: ${{ secrets.CLOUDFRONT_ID_GNOCCHI }} | |
PATHS: '/*' | |
AWS_REGION: 'us-east-1' |