Skip to content

test: Add utils test coverage (#181) #44

test: Add utils test coverage (#181)

test: Add utils test coverage (#181) #44

Workflow file for this run

name: GitHub Pages
concurrency:
group: "github-pages"
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
deployments: write
on:
workflow_dispatch:
push:
branches:
- development
- dev
paths:
- "src/**"
- "public/**"
jobs:
publish:
name: Publish to GitHub Pages
if: ${{ github.repository_owner == 'amattu2' }}
runs-on: ubuntu-latest
environment: better-vinwiki (Development)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci
- name: Test (Jest)
run: npm run test:ci
- name: Lint (EsLint)
run: npm run lint:ci
- name: Build
env:
PUBLIC_URL: ${{ vars.PUBLIC_URL }}
REACT_APP_NAME: ${{ vars.REACT_APP_NAME }}
REACT_APP_URL: ${{ vars.REACT_APP_URL }}
REACT_APP_DESCRIPTION: ${{ vars.REACT_APP_DESCRIPTION }}
REACT_APP_SLOGAN: ${{ vars.REACT_APP_SLOGAN }}
REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }}
REACT_APP_MEDIA_API_URL: ${{ vars.REACT_APP_MEDIA_API_URL }}
REACT_APP_MEDIA_CDN_URL: ${{ vars.REACT_APP_MEDIA_CDN_URL }}
REACT_APP_API_CLIENT: ${{ vars.REACT_APP_API_CLIENT }}
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './build'
- uses: chrnorm/deployment-action@v2
name: Create Deployment
id: deployment_create
with:
token: ${{ github.token }}
environment-url: ${{ vars.REACT_APP_URL }}
environment: better-vinwiki (Development)
ref: ${{ github.head_ref || github.ref_name }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: Deployment - Success
if: success()
uses: chrnorm/deployment-status@v2
with:
token: ${{ github.token }}
environment-url: ${{ steps.deployment_create.outputs.environment_url }}
deployment-id: ${{ steps.deployment_create.outputs.deployment_id }}
state: 'success'
- name: Deployment - Failed
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: ${{ github.token }}
environment-url: ${{ steps.deployment_create.outputs.environment_url }}
deployment-id: ${{ steps.deployment_create.outputs.deployment_id }}
state: 'failure'