馃殌 Deploy - Demos #13
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 - Demos | |
run-name: 馃殌 Deploy - Demos | |
on: workflow_dispatch | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
steps: | |
- name: 鈿欙笍 Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: 鈿欙笍 Set BRAND_NAME environment variable from repo name | |
run: echo BRAND_NAME=${{ github.event.repository.name }} | cut -d '-' -f1 >> $GITHUB_ENV | |
- name: 猬囷笍 Checkout template | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.BRAND_NAME }}/nextjs-mui-free | |
- name: 猬囷笍 Checkout scripts | |
uses: actions/checkout@v4 | |
with: | |
repository: themeselection/automation-scripts | |
token: ${{ secrets.GH_PAT }} | |
path: automation-scripts | |
- name: 猬囷笍 Install packages in automation-scripts dir | |
working-directory: automation-scripts/nextjs | |
run: pnpm i | |
- name: 猬囷笍 Install packages in typescript version | |
working-directory: ${{ env.BRAND_NAME }}/nextjs-mui-free/typescript-version | |
run: pnpm i | |
- name: 猬囷笍 Install netlify CLI | |
working-directory: ${{ env.BRAND_NAME }}/nextjs-mui-free/typescript-version | |
run: pnpm i -D netlify-cli | |
- name: 馃攲 Connect to Netlify Site | |
run: netlify link | |
- name: 馃殌 Build & Deploy | |
working-directory: ${{ env.BRAND_NAME }}/nextjs-mui-free/typescript-version | |
run: pnpm netlify deploy --dir .next --prod --build |