Production Build #4
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: 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: "22" | |
- name: Install dependencies | |
run: npm install --omit=dev | |
working-directory: app | |
- name: Remove unnecessary server app files | |
run: rm -rf prettier.config.js manifest-dev.yml manifest-staging.yml app/tests | |
working-directory: app | |
- name: Create production artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lew_v${{ env.APP_VERSION }} | |
path: app |