-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
265 additions
and
692 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 |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
] | ||
}, | ||
"ignorePatterns": [ | ||
"./node_modules/", | ||
"./browser/scripts/" | ||
"node_modules/", | ||
"browser/scripts/" | ||
] | ||
} |
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,87 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'browser/**/*' | ||
- 'functions/**/*' | ||
- 'scripts/**/*' | ||
- '*.json' | ||
- '*.toml' | ||
- '.github/workflows/ci.yml' | ||
branches: | ||
- '**' | ||
tags: | ||
- '*.*.*' | ||
workflow_dispatch: | ||
|
||
env: | ||
ARTIFACT_NAME: oauth-demo | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm clean-install | ||
|
||
- name: Lint code | ||
run: npm run lint | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Upload browser artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: browser/ | ||
|
||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-22.04 | ||
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
needs: build | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deploy-to-pages.outputs.page_url }} | ||
concurrency: | ||
group: github-pages | ||
cancel-in-progress: false | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup GitHub Pages | ||
id: setup-pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Download browser artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: browser | ||
|
||
- name: Upload to GitHub Pages | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: browser | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deploy-to-pages | ||
uses: actions/deploy-pages@v2 |
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
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,3 +1,3 @@ | ||
export function onRequest() { | ||
return new Response( "Hello world!" ) | ||
return new Response( "Hello World!" ) | ||
} |
Oops, something went wrong.