-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2cf7bd
commit 2ecf3ee
Showing
21 changed files
with
8,671 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,89 @@ | ||
name: Website Deployment | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./Section-05/sample-project | ||
steps: | ||
- name: Get code | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint code | ||
run: npm run lint | ||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./Section-05/sample-project | ||
steps: | ||
- name: Get code | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Test code | ||
id: run-tests | ||
run: npm run test | ||
- name: Upload test report | ||
if: failure() && steps.run-tests.outcome == 'failure' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-report | ||
path: ./Section-05/sample-project/test.json | ||
build: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./Section-05/sample-project | ||
steps: | ||
- name: Get code | ||
uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build website | ||
id: build-website | ||
run: npm run build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-files | ||
path: ./Section-05/sample-project/dist | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./Section-05/sample-project | ||
steps: | ||
- name: Get build artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist-files | ||
- name: Output contents | ||
run: ls | ||
- name: Deploy | ||
run: echo "Deploying..." |
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,5 @@ | ||
# Controlling Workflow & Job Execution | ||
|
||
## Understanding conditional steps and jobs | ||
|
||
<p align="center"><img src ="images/conditional-gh.png" /></p> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"browser": true | ||
}, | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"extends": ["plugin:react/recommended", "plugin:react/jsx-runtime"], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"semi": [2, "always"] | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
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,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.