-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from NingW101/main
Add CI workflow yml
- Loading branch information
Showing
2 changed files
with
114 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install tool dependencies | ||
run: npm install | ||
- name: Build for production | ||
run: npm run prod:github | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload distribution folder | ||
path: 'dist' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,69 @@ | ||
# | ||
# Copyright (C) 2024 Intel Corporation. All rights reserved. | ||
# Licensed under the Apache License 2.0. See LICENSE in the project root for license information. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
name: Web AI Showcase CI | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "README.md" | ||
- "CODE_OF_CONDUCT.md" | ||
- "CONTRIBUTING.md" | ||
- "LICENSE" | ||
- "SECURITY.md" | ||
- "ATTRIBUTIONS.md" | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
paths-ignore: | ||
- "README.md" | ||
- "CODE_OF_CONDUCT.md" | ||
- "CONTRIBUTING.md" | ||
- "LICENSE" | ||
- "SECURITY.md" | ||
- "ATTRIBUTIONS.md" | ||
# allow to be triggered manually | ||
workflow_dispatch: | ||
|
||
# Cancel any in-flight jobs for the same PR/branch so there's only one active | ||
# at a time | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linting_check: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 5 | ||
|
||
- name: Install tool dependencies | ||
run: npm install | ||
|
||
- name: Linting Check | ||
run: npm run lint | ||
|
||
build_prod_4_gh_pages: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 5 | ||
|
||
- name: Install tool dependencies | ||
run: npm install | ||
|
||
- name: Build production | ||
run: npm run prod:github |