Skip to content

Commit

Permalink
Merge pull request #8 from Pats101/implement_workflow_actions
Browse files Browse the repository at this point in the history
Implement workflow for joke cracker on github actions repo
  • Loading branch information
Pats101 authored Sep 26, 2024
2 parents 454f4b8 + 6ae0f8a commit b1300f7
Show file tree
Hide file tree
Showing 12 changed files with 5,553 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}
42 changes: 42 additions & 0 deletions .github/workflows/deploy-joke-cracker-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This GitHub Actions workflow automates the deployment process for the Inspiring Quote Generator application.
# It is triggered on push events to the main branch and includes the following steps:
# 1. Checkout the repository.
# 2. Set up the Node.js environment.
# 3. Install dependencies using npm.
# 4. Run tests to ensure code quality.
# 5. Build the application.
# 6. Deploy the application to the specified hosting service.
name: Deploy Joke Cracker Generator

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run Gitleaks to detect sensitive data
uses: zricethezav/gitleaks-action@v1.2.0
with:
config_path: .gitleaks.toml
args: "--path . --verbose"

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npm run lint

- name: Build project
run: npm run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 4 additions & 0 deletions _headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
5 changes: 5 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Redirect /old-page to /new-page
/old-page /new-page 301

# For SPAs, redirect all 404s to the index.html
/* /index.html 200
2 changes: 2 additions & 0 deletions dist/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
ignores: ['node_modules/**', 'dist/**'],
};


8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import globals from "globals";
import pluginJs from "@eslint/js";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
];
Loading

0 comments on commit b1300f7

Please sign in to comment.