Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f2a0868
First Commit
Mar 31, 2025
be1e543
Update README.md
kendallmark3 Apr 1, 2025
b1036d6
readme.md
Jun 7, 2025
0ba610d
Create main.yml
kendallmark3 Jun 7, 2025
8964b38
github
Jun 7, 2025
09a9eb7
github
Jun 7, 2025
3555b81
github
Jun 7, 2025
b2a103c
github
Jun 7, 2025
c217044
github
Jun 7, 2025
32f7420
github
Jun 7, 2025
17bb621
github
Jun 7, 2025
333d457
github
Jun 7, 2025
b0b6a63
github
Jun 7, 2025
37cbbf6
github
Jun 7, 2025
4a30da0
Update main.yml
kendallmark3 Jun 7, 2025
28d5641
Update main.yml
kendallmark3 Jun 7, 2025
416493e
Update main.yml
kendallmark3 Jun 7, 2025
92240e0
github
Jun 7, 2025
a72ec4e
Create main.yml
kendallmark3 Jun 7, 2025
5e917d5
github
Jun 7, 2025
b39dff6
github
Jun 7, 2025
1223efe
github
Jun 7, 2025
b8b0ced
github
Jun 7, 2025
2de450a
github
Jun 7, 2025
73bcbf6
github
Jun 7, 2025
8bcfbaf
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
598e012
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
39ac777
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
e8da59d
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
1d853b5
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
782645b
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
a20bcbe
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
d4d23df
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
87ed2b1
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
f869db5
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
4e2991f
Final attempt: Clean paste with whitespace verification
Jun 7, 2025
5f4055e
debugging
Jun 7, 2025
ee48bcd
debugging
Jun 7, 2025
6804633
debugging
Jun 7, 2025
a51e460
debugging
Jun 7, 2025
08e9a5f
debugging
Jun 7, 2025
c746b0c
debugging
Jun 7, 2025
9a4f50b
debugging
Jun 7, 2025
2dcaca4
debugging
Jun 7, 2025
f14f82b
files
Jun 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# .github/workflows/main.yml - Build and Test Workflow (Cleaned)
name: Build and Test Workflow

on:
push:
branches:
- main # This workflow runs when code is pushed to the main branch

jobs:
build:
runs-on: ubuntu-latest
# Define the default working directory for all 'run' commands and actions in this job
defaults:
run:
working-directory: './Code/04 Artifacts & Outputs/03 Finished Project' # Your specified subdirectory
steps:
- name: Get code
uses: actions/checkout@v3 # Checks out your repository's code

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm # Path to the directory to cache
# Corrected hashFiles key syntax
key: "deps-node-modules-${{ hashFiles('Code/04 Artifacts & Outputs/03 Finished Project/package-lock.json') }}"

- name: Install dependencies
run: npm ci # Installs dependencies from package-lock.json

- name: Build website
run: npm run build # Builds your website for production

- name: Upload artifacts
uses: actions/upload-artifact@v4 # Using version 4
with:
name: dist-files # Name for the uploaded artifact
path: dist # Path to the built files (relative to the working directory)
if-no-files-found: warn # Warn if no files found, but don't fail job
compression-level: 6
overwrite: false
include-hidden-files: false

test:
needs: build # This job will only run after the 'build' job completes successfully
runs-on: ubuntu-latest
# Define the default working directory for all 'run' commands in this job.
defaults:
run:
working-directory: './Code/04 Artifacts & Outputs/03 Finished Project' # Your specified subdirectory
steps:
- name: Get code
uses: actions/checkout@v3 # Checks out your repository's code

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm # Path to the directory to cache
# Corrected hashFiles key syntax
key: "deps-node-modules-${{ hashFiles('Code/04 Artifacts & Outputs/03 Finished Project/package-lock.json') }}"

- name: Install dependencies
run: npm ci # Installs dependencies from package-lock.json

- name: Lint code
run: npm run lint # Runs your project's lint script

- name: Test code
run: npm run test # Runs your project's test script
3 changes: 2 additions & 1 deletion Code/02 Basics/01 First Workflow/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Getting Started with GitHub Actions

This repository will be used to get started with GitHub Actions!
This repository will be used to get started with GitHub Actions!
Let's Test ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# .github/workflows/deploy-website.yml
name: Deploy website

on:
push:
branches:
- main # This workflow runs when code is pushed to the main branch

jobs:
test:
runs-on: ubuntu-latest
# Define the default working directory for all 'run' commands in this 'test' job.
# This assumes your package.json, package-lock.json, etc., are inside this directory.
defaults:
run:
working-directory: './Code/04 Artifacts & Outputs/03 Finished Project' # <--- Correct path for your project
steps:
- name: Get code
uses: actions/checkout@v3 # Checks out your repository's code

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm # Path to the directory to cache
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }} # Cache key based on package-lock.json

- name: Install dependencies
run: npm ci # Installs dependencies from package-lock.json (requires it to be present)

- name: Lint code
run: npm run lint # Runs your project's lint script

- name: Test code
run: npm run test # Runs your project's test script

build:
needs: test # This job will only run after the 'test' job completes successfully
runs-on: ubuntu-latest
outputs:
script-file: ${{ steps.publish.outputs.script-file }} # Outputs the generated JavaScript filename
# Define the default working directory for all 'run' commands in this 'build' job.
# This assumes your package.json, package-lock.json, etc., are inside this directory.
defaults:
run:
working-directory: './Code/04 Artifacts & Outputs/03 Finished Project' # <--- Correct path for your project
steps:
- name: Get code
uses: actions/checkout@v3 # Checks out your repository's code

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm ci # Installs dependencies

- name: Build website
run: npm run build # Builds your website for production
# Note: The 'dist/' path here is relative to the working-directory set above.
# So, if your project builds to 'Code/04 Artifacts & Outputs/03 Finished Project/dist',
# then 'dist/' is correct.

- name: Publish JS filename
id: publish # Gives this step an ID to reference its outputs
# Finds the generated JS file in 'dist/assets' and sets it as an output
run: find dist/assets/*.js -type f -execdir echo 'script-file={}' >> $GITHUB_OUTPUT ';'

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files # Name for the uploaded artifact
path: dist # Path to the built files (relative to the working directory)

deploy:
needs: build # This job will only run after the 'build' job completes successfully
runs-on: ubuntu-latest
steps:
- name: Get build artifacts
uses: actions/download-artifact@v3 # Downloads the 'dist-files' artifact
with:
name: dist-files # Name of the artifact to download
- name: Output contents
run: ls # Lists the contents of the current directory (should show 'dist' files)
- name: Output filename
run: echo "Generated script file: ${{ needs.build.outputs.script-file }}" # Displays the JS filename from the build job
- name: Deploy
run: echo "Deployment placeholder executed."
Loading