-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b0d37e
commit beea976
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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: 8 | ||
|
||
- 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 |