Deploy Base Front #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: Deploy Base Front | |
on: | |
push: | |
branches: | |
- deploy/production | |
paths: | |
- "base/apps/front-end/**" | |
- "base/apps/common/**" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
name: Deploy Base Front to Netlify | |
runs-on: ubuntu-latest | |
environment: production | |
defaults: | |
run: | |
working-directory: ./base/apps/front-end | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.PAT_TOKEN_FOR_SUBMODULE }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.1.4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.14.x" | |
cache: "pnpm" | |
cache-dependency-path: | | |
base/apps/front-end/pnpm-lock.yaml | |
base/apps/common/pnpm-lock.yaml | |
- name: Install dependencies | |
run: | | |
cd ../common/ | |
pnpm install | |
cd ../front-end/ | |
pnpm install | |
- name: Build | |
env: | |
VITE_BACK_END_API_ENDPOINT: "https://api.admin-solution-plus.ai.lonestone.io" | |
run: pnpm run build | |
- name: Deploy | |
run: | | |
pnpm --package=netlify-cli dlx netlify deploy \ | |
--dir ./dist \ | |
-a ${{ secrets.NETLIFY_PAT }} \ | |
-s ${{ vars.NETLIFY_SITE_ID }} \ | |
--prod \ | |
--message "Deploy from GitHub Actions [sha: ${{ github.sha }}]" |