Repository navigation
Demo: deploy our demo app to GitHub Pages whenever main gets updated #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,50 @@ | ||
| name: Demo | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Only deploy one version of our demo app at a time, letting a deployment that has started finish, since cancelling it | ||
| # could leave GitHub Pages in an inconsistent state. | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| if: ${{ github.repository == 'opencor/plot' }} | ||
| name: Build | ||
| runs-on: ubuntu-26.04 | ||
| steps: | ||
| - name: Check out OpenCOR Plot | ||
| uses: actions/checkout@v7 | ||
| - name: Install bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| - name: OpenCOR Plot dependencies | ||
| run: bun install --frozen-lockfile | ||
| - name: Build OpenCOR Plot's demo app | ||
| run: bun build:demo | ||
| - name: Configure GitHub Pages | ||
| uses: actions/configure-pages@v6 | ||
| - name: Upload OpenCOR Plot's demo app | ||
| uses: actions/upload-pages-artifact@v5 | ||
| with: | ||
| path: demo/dist | ||
| deploy: | ||
| name: Deploy | ||
| needs: build | ||
| runs-on: ubuntu-26.04 | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Deploy OpenCOR Plot's demo app to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v5 | ||
This file contains hidden or 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 hidden or 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 hidden or 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,10 +1,13 @@ | ||
| import vuePlugin from '@vitejs/plugin-vue'; | ||
| import * as vite from 'vite'; | ||
|
|
||
| // Note: this configuration is for our demo app, which uses our component from its sources (rather than from our library | ||
| // build, see vite.lib.config.ts), so that changes to our component get hot-reloaded. | ||
| // Note #1: this configuration is for our demo app, which uses our component from its sources (rather than from our | ||
| // library build, see vite.lib.config.ts), so that changes to our component get hot-reloaded. | ||
| // Note #2: our demo app refers to its assets using relative paths, so that it works wherever it is served from (e.g., | ||
| // https://opencor.github.io/plot/, see .github/workflows/demo.yml). | ||
|
|
||
| export default vite.defineConfig({ | ||
| base: './', | ||
| root: 'demo', | ||
| plugins: [vuePlugin()] | ||
| }); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.