Skip to content

Commit

Permalink
[feat] try building 'all' sample plugins to shared dist
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyward committed Aug 16, 2024
1 parent 4c41492 commit ae7d659
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/publish-sample-add-ons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# TODO: run this in a loop when there are multiple samples.
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -40,13 +39,14 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: addons-web-sdk/hello-world/package-lock.json
# TODO: run this in a loop when there are multiple samples.
- run: npm run build
working-directory: addons-web-sdk/hello-world
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: page
path: addons-web-sdk/hello-world/dist
path: addons-web-sdk/dist
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
Expand All @@ -63,12 +63,11 @@ jobs:
uses: actions/download-artifact@v4
with:
name: page
path: hello-world
# TODO: run this in a loop when there are multiple samples.
path: .
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: hello-world
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build outputs for sample Meet Add-ons
addons-web-sdk/*/dist/
addons-web-sdk/dist/
addons-web-sdk/*/node_modules/
addons-web-sdk/*/.DS_STORE
2 changes: 1 addition & 1 deletion addons-web-sdk/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"build": "npm install && mkdir -p dist && cp src/*.html dist/ && npx webpack"
"build": "npm install && mkdir -p ../dist/hello-world && cp src/*.html ../dist/hello-world/ && npx webpack"
},
"dependencies": {
"@googleworkspace/meet-addons": "^0.9.1"
Expand Down
2 changes: 1 addition & 1 deletion addons-web-sdk/hello-world/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ module.exports = {
output: {
filename: 'main.js',
library: "helloWorld",
path: path.resolve(__dirname, 'dist'),
path: path.resolve(__dirname, '../dist/hello-world'),
},
};

0 comments on commit ae7d659

Please sign in to comment.