-
Notifications
You must be signed in to change notification settings - Fork 0
WEBDEV-8141: Github Pages #25
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
Show all changes
29 commits
Select commit
Hold shift + click to select a range
34d2f9d
Add github pages preview
jbuckner a9da28a
Update ghpages scripts
jbuckner 9ac7d1d
Update pages command
jbuckner ed03222
Update branch name
jbuckner 5b20757
Update ghpages build config
jbuckner bcf6df7
Remove type reference
jbuckner aa11afb
Bump
jbuckner ae87184
Bump
jbuckner 87ce860
Move workflows
jbuckner 036c56f
Update ghpages scripts
jbuckner 131cb48
Test ghpages build without wireit
jbuckner fcdba50
Revert "Test ghpages build without wireit"
jbuckner 59b5bec
Reapply "Test ghpages build without wireit"
jbuckner f054924
Revert "Reapply "Test ghpages build without wireit""
jbuckner b1ed4aa
Add permissions
jbuckner 0106dbe
Try using npm run build
jbuckner b968a7b
Try just running vite build
jbuckner 9d85a6d
Update base path
jbuckner b97b99b
Use ghpages:publish
jbuckner da2d069
Set up git
jbuckner dd7a89a
Merge branch 'main' into github-pages
jbuckner 6d79b3a
Remove unused npm scripts
jbuckner f99c48d
Combine build/no-jekyl step
jbuckner e2576ad
Update workflows
jbuckner 86033ca
Fix class names
jbuckner 6b41a87
Remove unused package
jbuckner bdb6930
Linting
jbuckner 7abdc3b
Move tslib to devDependencies
jbuckner 6727556
Revert tslib change
jbuckner 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,40 @@ | ||
| # This workflow will generate the static page under `main` subdirectory inside the `ghpages` branch | ||
|
|
||
| # This workflow will run every time new changes were pushed to the `main` branch | ||
|
|
||
| name: App build CI/CD to main branch | ||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| concurrency: ci-${{ github.ref }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout 🛎️ | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Git | ||
| run: | | ||
| git config --global user.name "Github Actions" | ||
| git config --global user.email "actions@github.com" | ||
|
|
||
| - name: Install and Build 🔧 | ||
| run: | | ||
| npm ci | ||
| npm run ghpages:build | ||
|
|
||
| - name: Deploy 🚀 | ||
| uses: JamesIves/github-pages-deploy-action@v4 | ||
| with: | ||
| branch: ghpages | ||
| folder: ghpages | ||
| clean-exclude: pr/ | ||
| force: false | ||
| target-folder: main |
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,65 @@ | ||
| # This workflow will generate the static page under `pr` subdirectory inside the `ghpages` branch | ||
|
|
||
| # This workflow will run every time there's a PR opened, reopened, synchronize, or closed | ||
|
|
||
| name: Deploy PR previews | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| - closed | ||
|
|
||
| concurrency: preview-${{ github.ref }} | ||
|
|
||
| env: | ||
| PREVIEW_BRANCH: ghpages | ||
| jobs: | ||
| deploy-preview: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v4 | ||
|
|
||
| - name: Set up Git | ||
| run: | | ||
| git config --global user.name "Github Actions" | ||
| git config --global user.email "actions@github.com" | ||
|
|
||
| - name: Install and Build | ||
| run: | | ||
| npm install | ||
| npm run ghpages:build | ||
|
|
||
| # Reference: https://github.com/rossjrw/pr-preview-action | ||
| - name: Deploy preview | ||
| uses: rossjrw/pr-preview-action@v1 | ||
| id: preview-step | ||
| with: | ||
| source-dir: ./ghpages/ | ||
| umbrella-dir: pr | ||
| preview-branch: ${{ env.PREVIEW_BRANCH }} | ||
| comment: false | ||
|
|
||
| - uses: marocchino/sticky-pull-request-comment@v2 | ||
| if: steps.preview-step.outputs.deployment-action == 'deploy' | ||
| with: | ||
| header: pr-preview | ||
| message: | | ||
| [PR Preview Action](https://github.com/rossjrw/pr-preview-action) ${{ steps.preview-step.outputs.action-version }} | ||
| :---: | ||
| | <p></p> :rocket: View preview at <br> ${{ steps.preview-step.outputs.preview-url }}demo/ <br><br> | ||
| | <h6>Built to branch [`${{ env.PREVIEW_BRANCH }}`](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.PREVIEW_BRANCH }}) at ${{ steps.preview-step.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br><br> </h6> | ||
|
|
||
| - uses: marocchino/sticky-pull-request-comment@v2 | ||
| if: steps.preview-step.outputs.deployment-action == 'remove' | ||
| with: | ||
| header: pr-preview | ||
| message: | | ||
| [PR Preview Action](https://github.com/rossjrw/pr-preview-action) ${{ steps.preview-step.outputs.action-version }} | ||
| :---: | ||
| Preview removed because the pull request was closed. | ||
| ${{ steps.preview-step.outputs.action-start-time }} |
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 |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ node_modules/ | |
| dist | ||
| coverage | ||
| __screenshots__ | ||
| ghpages | ||
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
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
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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { defineConfig } from 'vitest/config'; | ||
| import path from 'path'; | ||
|
|
||
| // https://vitejs.dev/config/ | ||
| export default defineConfig({ | ||
| base: './', | ||
| resolve: { | ||
| alias: { | ||
| '@src': path.resolve(__dirname, './src'), | ||
| '@demo': path.resolve(__dirname, './demo'), | ||
| }, | ||
| }, | ||
| build: { | ||
| outDir: './ghpages/demo', | ||
| emptyOutDir: true, | ||
| manifest: true, | ||
| }, | ||
| }); |
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.