-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from marmelab/feat/ci-cd
Feat(ops): Add CI/CD pipeline
- Loading branch information
Showing
14 changed files
with
394 additions
and
236 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ lib | |
esm | ||
prism.js | ||
packages/create-react-admin/templates/** | ||
.github |
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
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,67 @@ | ||
name: 🚀 Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
checks: write | ||
|
||
jobs: | ||
lint: | ||
name: 🔎 ESLint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} | ||
steps: | ||
- name: 📥 Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⚙️ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: 📥 Download deps | ||
run: npm install | ||
|
||
- name: 🔬 Lint | ||
uses: wearerequired/lint-action@v2 | ||
with: | ||
eslint: true | ||
eslint_args: "**/*.{mjs,ts,tsx}" | ||
prettier: true | ||
prettier_args: "--config ./.prettierrc.mjs \"**/*.{js,json,ts,tsx,css,md,html}\"" | ||
|
||
build: | ||
name: 🔨 Build | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} | ||
steps: | ||
- name: 📥 Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⚙️ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: 📥 Download deps | ||
run: npm install | ||
|
||
- name: 🔨 Build | ||
run: make build |
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,51 @@ | ||
name: 🚀 Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
env: | ||
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | ||
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }} | ||
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }} | ||
|
||
steps: | ||
- name: 📥 Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⚙️ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: ⚙️ Setup supabase | ||
uses: supabase/setup-cli@v1 | ||
|
||
- name: 📥 Download deps | ||
run: npm install | ||
|
||
- name: 🔨 Build | ||
run: make build | ||
|
||
- name: 🔗 Supabase Link | ||
run: npx supabase link --project-ref $SUPABASE_PROJECT_ID | ||
|
||
- name: 📡 Push supabase migrations | ||
run: npx supabase db push | ||
|
||
- name: 📡 Deploy supabase functions | ||
run: npx supabase functions deploy | ||
|
||
- name: 📡 Deploy GitHub pages | ||
run: npm run ghpages:deploy |
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 |
---|---|---|
|
@@ -23,4 +23,5 @@ cypress/screenshots | |
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
!.yarn/versions | ||
.github |
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 |
---|---|---|
|
@@ -11,5 +11,5 @@ export default { | |
singleQuote: true, | ||
tabWidth: 4, | ||
trailingComma: 'es5', | ||
useTabs: false | ||
} | ||
useTabs: false, | ||
}; |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
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
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
Oops, something went wrong.