chore(deps): update dependency vite to ^5.2.13 #57
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: Release | |
on: | |
push: | |
branches: | |
- main | |
env: | |
UPIKOTH_PACKAGES_READ: ${{ secrets.UPIKOTH_PACKAGES_READ }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache npm dependencies | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
test-unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache npm dependencies | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Test | |
run: npm run test:unit | |
test-environment: | |
runs-on: ubuntu-latest | |
environment: | |
name: prod | |
env: | |
STARTER_API_URL: ${{ vars.STARTER_API_URL }} | |
SENTRY_DSN: ${{ vars.SENTRY_DSN }} | |
ENVIRONMENT: ${{ vars.ENVIRONMENT }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache npm dependencies | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Test environment variables | |
run: npm run test:environment | |
build: | |
needs: | |
- lint | |
- test-unit | |
- test-environment | |
name: Build starter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache npm dependencies | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Archive build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: ./dist | |
deploy-to-s3: | |
needs: build | |
name: Deploy to s3 | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- name: Download build | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: ./dist | |
- name: Set environment variables | |
uses: jsdaniell/create-json@v1.2.3 | |
with: | |
name: environment.json | |
json: '{ | |
"STARTER_API_URL":"${{ vars.STARTER_API_URL }}", | |
"SENTRY_DSN":"${{ vars.SENTRY_DSN }}", | |
"ENVIRONMENT":"${{ vars.ENVIRONMENT }}" | |
}' | |
dir: ./dist | |
- uses: MrMeison/yc-object-storage-action@v1 | |
with: | |
accessKeyId: ${{ secrets.S3_ACCESS_KEY_ID }} | |
secretAccessKey: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
bucketName: ${{ vars.S3_BUCKET_NAME }} | |
sourceDir: ./dist | |
clear: true |