fix(deps): update eslint monorepo to v9.9.1 #1701
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: Web | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: | |
- released | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
environment: | |
name: ${{ github.event_name == 'release' && 'production' || 'preview' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: langri-sha/github/actions/[email protected] | |
- name: Build | |
run: pnpm build | |
env: | |
ASSETS_URL: ${{ vars.ASSETS_URL }} | |
- name: Create artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web | |
path: apps/web/dist | |
if-no-files-found: error | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [build] | |
environment: | |
name: ${{ github.event_name == 'release' && 'production' || 'preview' }} | |
url: ${{ github.event_name == 'pull_request' && format('{0}/{1}', vars.URL, github.event.pull_request.number) || vars.URL }} | |
permissions: | |
contents: read | |
id-token: write | |
env: | |
GZIP_TYPES: css,eot,html,js,json,otf,svg,ttf,txt | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Google Cloud Platform | |
uses: langri-sha/github/actions/[email protected] | |
with: | |
service_account: ${{ vars.SERVICE_ACCOUNT }} | |
setup_gcloud: true | |
workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: web | |
path: dist/web | |
- name: Configure environment | |
run: | | |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then | |
echo "BUCKET=${{ vars.BUCKET }}/${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
echo "URL=${{ vars.URL }}/${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
else | |
echo "BUCKET=${{ vars.BUCKET }}" >> $GITHUB_ENV | |
echo "URL=${{ vars.URL }}" >> $GITHUB_ENV | |
fi | |
- name: Publish assets | |
run: | | |
gcloud storage cp dist/web/_next/** gs://${{ vars.ASSETS_BUCKET }}/_next \ | |
--cache-control="public, max-age=31536000, immutable" \ | |
--no-clobber \ | |
--project ${{ vars.EDGE_PROJECT_ID }} \ | |
--recursive | |
- name: Publish | |
run: | | |
rm -rf dist/web/_next | |
gcloud storage cp dist/web/* gs://${{ env.BUCKET }} \ | |
--cache-control="public, no-store" \ | |
--project ${{ vars.EDGE_PROJECT_ID }} \ | |
--recursive |