fix: scss linting #114
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
# DO NOT TOUCH THIS FILE | |
# Please speak to SudoVanilla (Korbs) if you have any issues. | |
# For Security check please contact Eveeifyeve Instead of sudovanilla. | |
name: Deploy Website | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
#Screenshot of website | |
# screenshot: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# with: | |
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# persist-credentials: true | |
# - name: Setup Node | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '20' # or any version you prefer | |
# - name: Install dependencies | |
# run: npm install | |
# - name: Run server | |
# run: | | |
# npm run start & | |
# echo "NODE_PID=$!" >> $GITHUB_ENV | |
# sleep 6 # give the server some time to start | |
# - name: Install bun | |
# run: npm install -g bun | |
# - name: Take screenshot | |
# run: | | |
# npm run screenshot | |
# - name: Stop server | |
# run: kill ${{ env.NODE_PID }} # this will kill the process started by npm start | |
# - name: Commit and push if it changed | |
# run: | | |
# git config --global user.name 'Your Name' | |
# git config --global user.email '[email protected]' | |
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
# git checkout "${GITHUB_REF:11}" | |
# git commit -am "Automated Screenshot" | |
# git push | |
# --------------------------------------------------------------------- | |
# Linting - StyleLint + ESLint | |
Linting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install | |
- name: Run Stylelint | |
run: bun run lint:css | |
# --------------------------------------------------------------------- | |
# Formating - Prettier | |
Formating: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install > log.txt 2>&1 || exit 1 | |
- name: Run bun fmt | |
run: bun fmt >> log.txt 2>&1 | |
- name: Upload log | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: prettier(fmt) | |
path: log.txt | |
# --------------------------------------------------------------------- | |
# CommitLinting - Convertential Commits | |
CommitLint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install required dependencies | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install packages | |
run: | | |
bun install | |
- name: Print versions | |
run: | | |
bun --version | |
bunx commitlint --version | |
- name: Install commitlint | |
run: | | |
bun install conventional-changelog-conventionalcommits | |
bun install commitlint@latest | |
- name: Validate current commit (last commit) with commitlint | |
if: github.event_name == 'push' | |
run: bunx commitlint --from HEAD~1 --to HEAD --verbose | |
- name: Validate PR commits with commitlint | |
if: github.event_name == 'pull_request' | |
run: bunx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
# --------------------------------------------------------------------- | |
# Building the website | |
Build: | |
runs-on: self-hosted | |
needs: [Linting, Formating, CommitLint] | |
steps: | |
- uses: actions/checkout@v3 | |
# Install Dependenices | |
- run: bun install | |
# Build Website | |
- run: bun run build | |
# Add to NGINX | |
- run: mv dist/ teaclientmc/ |