-
Notifications
You must be signed in to change notification settings - Fork 4
Migrate from webpack/gulp to Astro #1195
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
11 commits
Select commit
Hold shift + click to select a range
70c9d06
Migrate from webpack/gulp to Astro
dobromirts 8d05efe
fix race condition security check
dobromirts 73e89aa
Merge branch 'vnext' of https://github.com/IgniteUI/igniteui-wc-examp…
dobromirts d8d440f
add web.config
dobromirts f3d5e0c
Add GitHub Actions workflow for building and deploying WC Samples
dobromirts 1127a3f
Potential fix for code scanning alert no. 210: Workflow does not cont…
dobromirts b41673c
add base path for the IIS deploy
dobromirts 2f49c6e
Merge branch 'migrate-samples-browser-to-astro' of https://github.com…
dobromirts e7200dc
convert build scripts to async promise-based
dobromirts b6557b2
Merge branch 'vnext' of https://github.com/IgniteUI/igniteui-wc-examp…
dobromirts e83a185
chore(cd): removing azure-devops-powered deploy
ChronosSF 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 was deleted.
Oops, something went wrong.
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,123 @@ | ||
|
|
||
| # | ||
| # Prerequisites – igniteui-actions repo: | ||
| # - A workflow that handles event_type 'wc-samples-cd' (add one, or confirm the correct event name). | ||
|
|
||
| name: Build and Deploy - WC Samples EN | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - vnext | ||
| - master | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch: | ||
| description: 'Branch to build and deploy (e.g. vnext)' | ||
| required: true | ||
|
|
||
| env: | ||
| BRANCH_REF: ${{ github.event.inputs.branch && format('refs/heads/{0}', github.event.inputs.branch) || github.ref }} | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| name: Build and Deploy - WC Samples EN | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ env.BRANCH_REF }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22.x' | ||
|
|
||
| - name: Create .npmrc file | ||
| run: | | ||
| if [ -f ".npmrc" ]; then | ||
| rm .npmrc | ||
| fi | ||
| touch .npmrc | ||
|
|
||
| - name: Configure licensed @infragistics registry | ||
| run: | | ||
| echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> .npmrc | ||
| echo "//packages.infragistics.com/npm/js-licensed/:username=${{ secrets.INFRAGISTICS_NPM_USER }}" >> .npmrc | ||
| echo "//packages.infragistics.com/npm/js-licensed/:_auth=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc | ||
|
|
||
| - name: npm install --legacy-peer-deps | ||
| run: npm install --legacy-peer-deps | ||
|
|
||
| # "Uninstall all IG trial packages & re-install their licensed versions" | ||
| - name: Replace trial IG packages with licensed versions | ||
| shell: pwsh | ||
| run: | | ||
| Get-Content -Path ./.npmrc | ||
| $packageJson = Get-Content -Raw ./package.json | ConvertFrom-Json | ||
| $npmUninstallPackages = "npm uninstall --save " | ||
| $npmInstallPackages = "npm install --legacy-peer-deps " | ||
| $packageJson.dependencies.PSObject.Properties | ` | ||
| Where-Object { | ||
| $_.Name.StartsWith("igniteui-webcomponents-") -or $_.Name.StartsWith("igniteui-dockmanager") | ||
| } | ` | ||
| ForEach-Object { | ||
| $npmUninstallPackages += $_.Name + " " | ||
| $npmInstallPackages += "@infragistics/" + $_.Name + "@" + $_.Value + " " | ||
| } | ||
| Write-Host $npmUninstallPackages | ||
| Write-Host $npmInstallPackages | ||
| Invoke-Expression -Command "$npmUninstallPackages" | ||
| Invoke-Expression -Command "$npmInstallPackages" | ||
|
|
||
| - name: npm run build | ||
| run: npm run build | ||
| env: | ||
| BASE_PATH: /webcomponents-demos | ||
|
|
||
| # Package the contents of dist folder as a zip artifact | ||
| - name: Create zip artifact | ||
| run: | | ||
| cd dist | ||
| zip -r ${{ github.workspace }}/WebComponentsSamples.zip ./ | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: WebComponentsSamplesBrowser | ||
| path: WebComponentsSamples.zip | ||
| retention-days: 1 | ||
|
|
||
| - name: Get app token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v2 | ||
| with: | ||
| app-id: ${{ secrets.IGNITEUI_GITHUB_APP_ID }} | ||
| private-key: ${{ secrets.IGNITEUI_GITHUB_APP_PRIVATE_KEY }} | ||
| owner: IgniteUI | ||
| repositories: igniteui-actions | ||
|
|
||
| - name: Trigger Deploy Workflow in IgniteUI Actions | ||
| uses: actions/github-script@v8 | ||
| with: | ||
| github-token: ${{ steps.app-token.outputs.token }} | ||
| script: | | ||
| await github.rest.repos.createDispatchEvent({ | ||
| owner: 'IgniteUI', | ||
| repo: 'igniteui-actions', | ||
| event_type: 'wc-samples-cd', | ||
| client_payload: { | ||
| calling_branch: "${{ env.BRANCH_REF }}", | ||
| repository: "${{ github.repository }}", | ||
| run_id: "${{ github.run_id }}", | ||
| artifact_name: "WebComponentsSamplesBrowser", | ||
| ref: "${{ github.ref }}", | ||
| sha: "${{ github.sha }}", | ||
| branch: "${{ github.ref_name }}", | ||
| } | ||
| }); | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.