Skip to content

Commit

Permalink
Created gh action for building production.
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwinderg committed Jul 3, 2024
1 parent eeb9cc8 commit ce25fe0
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Production Build

# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Set shared environment variables
env:
APP_VERSION: 2.4.0

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
environment: production

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Set up node and npm
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install --omit=dev
working-directory: app

- name: Run tests
run: npm test
working-directory: app

- name: Remove unnecessary server app files
run: rm -rf prettier.config.js manifest-dev.yml manifest-staging.yml
working-directory: app

- name: Create production artifact
uses: actions/upload-artifact@v4
with:
name: lew_v${{ env.APP_VERSION }}
path: app

0 comments on commit ce25fe0

Please sign in to comment.