Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase mr #28

Merged
merged 11 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "prizmui"
}
}
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

jobs:
main:
pr_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -17,11 +17,30 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2

- run: npm ci
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts

- run: npx nx workspace-lint
- run: npx nx format:check --base=origin/main
- run: npx nx clear-cache
- run: npx nx affected --target=test --base=origin/main --parallel --max-parallel=3
- run: npx nx affected --target=lint --base=origin/main --parallel --max-parallel=3
- run: npx nx affected --target=build --base=origin/main --prod --parallel --max-parallel=3
- run: npx nx affected --target=e2e --base=origin/main --prod --parallel --max-parallel=3
- name: 'Build doc app for firebase hosting'
run: npx nx build doc
- name: 'Upload to Firebase HOSTING'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIZMUI }}'
expires: 5d
projectId: prizmui
13 changes: 12 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts

- run: npx nx clear-cache
- run: npx nx affected:build --all --prod --parallel --max-parallel=3
- run: cd dist/libs/components && npm publish --verbose || exit_code=0
Expand Down
12 changes: 12 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"hosting": {
"public": "dist/apps/doc",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}