Skip to content

rollback @typescript-eslint/eslint-plugin to 7.7.0 so fixAll on save works #2945

rollback @typescript-eslint/eslint-plugin to 7.7.0 so fixAll on save works

rollback @typescript-eslint/eslint-plugin to 7.7.0 so fixAll on save works #2945

Workflow file for this run

name: Build and deploy
on: [ push, pull_request ]
env:
CI: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
jobs:
deploy:
environment: CI
name: build and deploy to AWS
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4.0.0
with:
version: 9.1.0
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Creating .npmrc
run: |
"${GITHUB_WORKSPACE}/scripts/create-npmrc.sh" "${{ secrets.NPM_TOKEN }}" "${{ secrets.GSAP_TOKEN }}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GSAP_TOKEN: ${{ secrets.GSAP_TOKEN }}
- name: Install Dependencies
run: pnpm i --no-frozen-lockfile
- name: Build App
run: pnpm build
- name: run architect deploy
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request'
working-directory: apps/frontendsupport
run: |
# N.Virginia us-east-1
pnpm deploy:web
node ./replace-workspace-protocol-by-version.mjs ./pruned/package.json
cd ./pruned
FLAGS=""
if [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == true ]]; then
FLAGS="--production"
else
FLAGS="--staging"
fi
GIT_COMMIT="$(git rev-parse HEAD)" pnpm arc deploy $FLAGS -v --prune
env:
NODE_ENV: production
- name: Invalidate Cloudfront cache staging
uses: imehedi/actions-awscli-v2@latest
with:
args: cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_STAGING_ID }} --paths "/*" --no-cli-pager
- name: Invalidate Cloudfront cache Production
if: startsWith(github.ref, 'refs/tags/v')
uses: imehedi/actions-awscli-v2@latest
with:
args: cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_PRODUCTION_ID }} --paths "/*" --no-cli-pager
- name: Run Mozilla Observatory tests
if: github.event_name == 'pull_request'
uses: simonireilly/observatory-github-action@v0.0.2-beta.0
id: observatory
with:
web_host: https://staging.frontendrescue.com
- name: Create commit comment
if: github.event_name == 'pull_request'
uses: peter-evans/commit-comment@v3
with:
body: '# Branch PR ${{ steps.observatory.outputs.observatory-report }}'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}