-
Notifications
You must be signed in to change notification settings - Fork 7
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 #2 from HarshitaShroff/main
Setup of Astro website (starlight) with CI/CD workflow and deployment on Netlify
- Loading branch information
Showing
33 changed files
with
9,796 additions
and
2 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,36 @@ | ||
# Description | ||
|
||
_Please include a summary of the change and which issue is fixed. Please also include relevant | ||
motivation and context. List any dependencies that are required for this change._ | ||
|
||
Fixes # (issue) | ||
|
||
## Type of change | ||
|
||
_Please delete options that are not relevant._ | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as | ||
expected) | ||
- [ ] Documentation (update or new) | ||
|
||
## How Has This Been Tested? | ||
|
||
_Please describe the tests that you ran to verify your changes. Provide instructions so we can | ||
reproduce. Please also list any relevant details for your test configuration_ | ||
|
||
## Testing Checklist | ||
|
||
- [ ] Tested in latest Chrome | ||
- [ ] Tested in latest Safari | ||
- [ ] Tested in latest Firefox | ||
|
||
## Checklist | ||
|
||
- [ ] My code follows the style guidelines of this project | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have requested a review from ... on the Pull Request |
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,29 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Linelint | ||
uses: fernandrone/linelint@master | ||
- name: Set up Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.14.2 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Prettier | ||
run: npm run format:check | ||
- name: Vale | ||
run: | | ||
sudo apt update | ||
sudo apt install snapd | ||
sudo snap install vale --edge | ||
npm run prose:check |
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,21 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
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,18 @@ | ||
# 'true' will fix files | ||
autofix: true | ||
|
||
# list of paths to ignore, uses gitignore syntaxes (executes before any rule) | ||
ignore: | ||
- .git/ | ||
|
||
rules: | ||
# checks if file ends in a newline character | ||
end-of-file: | ||
# set to true to enable this rule | ||
enable: true | ||
|
||
# set to true to disable autofix (if enabled globally) | ||
disable-autofix: false | ||
|
||
# if true also checks if file ends in a single newline character | ||
single-new-line: true |
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,8 @@ | ||
.vscode | ||
node_modules | ||
package.json | ||
package-lock.json | ||
yarn.lock | ||
dist | ||
|
||
|
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 @@ | ||
/** @type {import('prettier').Config} */ | ||
module.exports = { | ||
printWidth: 120, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
useTabs: false, | ||
|
||
plugins: ['prettier-plugin-astro'], | ||
|
||
overrides: [{ files: '*.astro', options: { parser: 'astro' } }], | ||
}; |
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,12 @@ | ||
# Vale configuration file. | ||
# | ||
# For more information, see https://errata-ai.gitbook.io/vale/getting-started/configuration. | ||
|
||
StylesPath = .vale | ||
MinAlertLevel = suggestion | ||
|
||
[*.md] | ||
|
||
|
||
# Ignore SVG markup | ||
TokenIgnores = (\*\*\{\w*\}\*\*) |
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,58 @@ | ||
{{- /* Modify Vale's output https://docs.errata.ai/vale/cli#--output */ -}} | ||
|
||
{{- /* Keep track of our various counts */ -}} | ||
|
||
{{- $e := 0 -}} | ||
{{- $w := 0 -}} | ||
{{- $s := 0 -}} | ||
{{- $f := 0 -}} | ||
|
||
{{- /* Range over the linted files */ -}} | ||
|
||
{{- range .Files}} | ||
|
||
{{- $f = add1 $f -}} | ||
{{- $path := .Path -}} | ||
|
||
{{- /* Range over the file's alerts */ -}} | ||
[ | ||
|
||
{{- range $idx, $a := .Alerts -}} | ||
|
||
{{- $error := "" -}} | ||
{{- if eq .Severity "error" -}} | ||
{{- $error = .Severity -}} | ||
{{- $e = add1 $e -}} | ||
{{- else if eq .Severity "warning" -}} | ||
{{- $error = .Severity -}} | ||
{{- $w = add1 $w -}} | ||
{{- else -}} | ||
{{- $error = .Severity -}} | ||
{{- $s = add1 $s -}} | ||
{{- end}} | ||
|
||
{{- /* Variables setup */ -}} | ||
|
||
{{- $path = $path -}} | ||
{{- $loc := printf "%d" .Line -}} | ||
{{- $check := printf "%s" .Check -}} | ||
{{- $message := printf "%s" .Message -}} | ||
{{- $link := printf "%s" .Link -}} | ||
{{- if $idx -}},{{- end -}} | ||
|
||
{{- /* Output */ -}} | ||
|
||
{ | ||
"description": "{{ $message }}", | ||
"fingerprint": "{{ $path }}-{{ $loc }}", | ||
"severity": "{{ $error }}", | ||
"location": { | ||
"path": "{{ $path }}", | ||
"lines": { | ||
"begin": {{ $loc }} | ||
} | ||
} | ||
} | ||
{{end -}} | ||
{{end -}} | ||
] |
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,51 @@ | ||
{{- /* Modify Vale's output https://docs.errata.ai/vale/cli#--output */ -}} | ||
|
||
{{- /* Keep track of our various counts */ -}} | ||
|
||
{{- $e := 0 -}} | ||
{{- $w := 0 -}} | ||
{{- $s := 0 -}} | ||
{{- $f := 0 -}} | ||
|
||
{{- /* Range over the linted files */ -}} | ||
|
||
{{- range .Files}} | ||
|
||
{{- $f = add1 $f -}} | ||
{{- $path := .Path | underline -}} | ||
|
||
{{- /* Range over the file's alerts */ -}} | ||
|
||
{{- range .Alerts -}} | ||
|
||
{{- $error := "" -}} | ||
{{- if eq .Severity "error" -}} | ||
{{- $error = .Severity | red -}} | ||
{{- $e = add1 $e -}} | ||
{{- else if eq .Severity "warning" -}} | ||
{{- $error = .Severity | yellow -}} | ||
{{- $w = add1 $w -}} | ||
{{- else -}} | ||
{{- $error = .Severity | blue -}} | ||
{{- $s = add1 $s -}} | ||
{{- end}} | ||
|
||
{{- /* Variables setup */ -}} | ||
|
||
{{- $path = $path -}} | ||
{{- $loc := printf "Line %d, position %d" .Line (index .Span 0) -}} | ||
{{- $check := printf "%s" .Check -}} | ||
{{- $message := printf "%s" .Message -}} | ||
{{- $link := printf "%s" .Link -}} | ||
|
||
{{- /* Output */ -}} | ||
|
||
{{ $path }}: | ||
{{ $loc }} (rule {{ $check }}) | ||
{{ $error }}: {{ $message }} | ||
More information: {{ $link }} | ||
|
||
{{end -}} | ||
{{end -}} | ||
|
||
{{- $e}} {{"errors" | red}}, {{$w}} {{"warnings" | yellow}}, and {{$s}} {{"suggestions" | blue}} found. |
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,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
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,18 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
}, | ||
{ | ||
"name": "Docker Node.js Launch", | ||
"type": "docker", | ||
"request": "launch", | ||
"preLaunchTask": "docker-run: debug", | ||
"platform": "node" | ||
} | ||
] | ||
} |
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,39 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "docker-build", | ||
"label": "docker-build", | ||
"platform": "node", | ||
"dockerBuild": { | ||
"dockerfile": "${workspaceFolder}/Dockerfile", | ||
"context": "${workspaceFolder}", | ||
"pull": true | ||
} | ||
}, | ||
{ | ||
"type": "docker-run", | ||
"label": "docker-run: release", | ||
"dependsOn": [ | ||
"docker-build" | ||
], | ||
"platform": "node" | ||
}, | ||
{ | ||
"type": "docker-run", | ||
"label": "docker-run: debug", | ||
"dependsOn": [ | ||
"docker-build" | ||
], | ||
"dockerRun": { | ||
"env": { | ||
"DEBUG": "*", | ||
"NODE_ENV": "development" | ||
} | ||
}, | ||
"node": { | ||
"enableDebugging": true | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.