-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Website CD pipeline
- Loading branch information
Showing
6 changed files
with
36 additions
and
16 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 |
---|---|---|
|
@@ -38,5 +38,6 @@ module.exports = { | |
'**/build', | ||
'**/public', | ||
'**/.cache', | ||
'packages/functions', | ||
], | ||
}; |
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,29 @@ | ||
name: Publish site to GitHub Pages | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-site-to-gh-pages: | ||
name: Publish site to GitHub Pages | ||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- name: Install npm dependencies | ||
run: yarn --immutable | ||
- name: Run build script | ||
run: yarn workspace site run | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: packages/site/build |
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
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,21 +1,11 @@ | ||
import { expect, describe, it } from '@jest/globals'; | ||
import { describe, expect, it } from '@jest/globals'; | ||
import { installSnap } from '@metamask/snaps-jest'; | ||
import { panel, heading, text } from '@metamask/snaps-sdk'; | ||
|
||
describe('onHomePage', () => { | ||
it('returns custom UI', async () => { | ||
it('renders a UI', async () => { | ||
const { onHomePage } = await installSnap(); | ||
|
||
const response = await onHomePage(); | ||
expect(response).toRender( | ||
panel([ | ||
heading('You have 0 LXP'), | ||
text('[Lineascan](https://lineascan.build/address/undefined)'), | ||
heading('Your POH status: ❌ Not verified'), | ||
text('[POH page](https://poh.linea.build)'), | ||
heading('There are no current activations'), | ||
text('[Activations page](https://linea.build/activations)'), | ||
]), | ||
); | ||
expect(response).not.toBeNull(); | ||
}); | ||
}); |