diff --git a/.github/workflows/deploy-catalog.yml b/.github/workflows/deploy-catalog.yml deleted file mode 100644 index 97f4ee791..000000000 --- a/.github/workflows/deploy-catalog.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build and Deploy Catalog -on: - push: - branches: main -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - uses: google/wireit@setup-github-actions-caching/v1 - - - run: npm ci - - run: npm run build:catalog - - - name: Deploy Catalog - uses: JamesIves/github-pages-deploy-action@v4.4.1 - with: - branch: gh-pages - folder: catalog/_prod \ No newline at end of file diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 000000000..14a974e1f --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,27 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: npm + - uses: google/wireit@setup-github-actions-caching/v1 + - run: npm ci + - run: 'npm run build:catalog' + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MATERIAL_WEB_CATALOG }}' + channelId: live + projectId: material-web-catalog + entryPoint: catalog diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 000000000..1f8893b69 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,24 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +'on': pull_request +jobs: + build_and_preview: + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: npm + - uses: google/wireit@setup-github-actions-caching/v1 + - run: npm ci + - run: 'npm run build:catalog' + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MATERIAL_WEB_CATALOG }}' + projectId: material-web-catalog + entryPoint: catalog diff --git a/button/demo/project.json b/button/demo/project.json index b9053089a..92f3e7958 100644 --- a/button/demo/project.json +++ b/button/demo/project.json @@ -1,5 +1,5 @@ { - "extends": "/material-web/assets/stories/base.json", + "extends": "/assets/stories/base.json", "files": { "demo.ts": { "hidden": true diff --git a/catalog/.firebaserc b/catalog/.firebaserc new file mode 100644 index 000000000..512b40792 --- /dev/null +++ b/catalog/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "material-web-catalog" + } +} diff --git a/catalog/eleventy-helpers/plugins/copy-code-button.cjs b/catalog/eleventy-helpers/plugins/copy-code-button.cjs index f3ddb846d..77c2c27f2 100644 --- a/catalog/eleventy-helpers/plugins/copy-code-button.cjs +++ b/catalog/eleventy-helpers/plugins/copy-code-button.cjs @@ -27,7 +27,7 @@ function renderCode(originalRule) { return ` ${originalHTMLContent} diff --git a/catalog/eleventy-helpers/shortcodes/playground-example.cjs b/catalog/eleventy-helpers/shortcodes/playground-example.cjs index 9289752ba..bf7371de6 100644 --- a/catalog/eleventy-helpers/shortcodes/playground-example.cjs +++ b/catalog/eleventy-helpers/shortcodes/playground-example.cjs @@ -53,9 +53,9 @@ function playgroundExample(eleventyConfig) { Expand interactive demo. -