Skip to content

Helm chart to 1.5.3 #241

Helm chart to 1.5.3

Helm chart to 1.5.3 #241

name: Deployment
on: [push, pull_request]
jobs:
vercel:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache
if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
working-directory: ./pwa
- name: Lint
run: npm run lint
working-directory: ./pwa
- name: Build
run: npm run build
working-directory: ./pwa
- name: Start Deployment
uses: bobheadxi/deployments@v0.4.3
id: deployment-preview
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Preview
- name: Deploy to Preview
id: vercel-action-preview
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: ${{ secrets.VERCEL_ORG_ID }}
working-directory: ./pwa
- name: Deploy to Production
uses: amondnet/vercel-action@v20
id: vercel-action-production
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-comment: false
vercel-args: "--prod"
working-directory: ./pwa
- name: Update Deployment Status
uses: bobheadxi/deployments@v0.4.3
if: github.ref != 'refs/heads/main'
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment-preview.outputs.deployment_id }}
env_url: ${{ steps.vercel-action-preview.outputs.preview-url }}