-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Write hello world add-on and deploy to GitHub Pages (#13)
* feat: Write hello world add-on and deploy to GitHub Pages * fix: main stage URL * fix: Clean up sample set up * fix: DS Store capitalization * refactor: export style of setUpAddon function Co-authored-by: Aziz Javed <[email protected]> --------- Co-authored-by: Aziz Javed <[email protected]>
- Loading branch information
Showing
9 changed files
with
1,673 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,71 @@ | ||
name: Deploy sample Add-ons to GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
cache-dependency-path: addons-web-sdk/samples/hello-world/package-lock.json | ||
# TODO: Currently hardcoded to addons-web-sdk. Need different approach when | ||
# there are multiple samples. | ||
- run: npm run build | ||
working-directory: addons-web-sdk/samples/hello-world | ||
- name: Upload build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: page | ||
path: addons-web-sdk/samples/dist | ||
if-no-files-found: error | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Download build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: page | ||
path: . | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: . | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,4 @@ | ||
# Build outputs for sample Meet Add-ons | ||
**/dist | ||
**/node_modules | ||
**/.DS_Store |
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,3 @@ | ||
# Hello, World: The Add-on | ||
|
||
This is approximately the simplest possible add-on. The only requirements to get started here are npm and GitHub. The intent of publishing this add-on is to demonstrate how easy it is to get started with rendering custom content using an add-on. Please see other samples at <https://github.com/googleworkspace/meet/tree/main/addons-web-sdk/samples> to learn more advanced functionality! |
Oops, something went wrong.