mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2024-12-23 04:25:35 +00:00
d0ab84a254
* Switch to node package Setup environment for: - Typescript - express with ejs as the view engine * Apply prettier formatting * Read API stats from Redis * Apply prettier formatting * Add Dockerfile * Add environment variables for configuration to README.md * Log redis errors correctly * Connect to redis before executing requests * Rename json properties to match the current ones * Configure Redis error handler and client correctly * Remove workflow to fix pnpm dependencies GitHub supports pnpm for dependabot natively now: https://github.blog/changelog/2023-06-12-dependabot-version-updates-now-supports-pnpm/ * Add REDIS_SOCKET env var and prefer it over REDIS_URL * Add default.nix * Add SOCKET_PATH env var and prefer it over HOST and PORT * Bump website version * Add node symlink to output directory * Add DATA_PATH env var * Apply prettier formatting --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
94 lines
2.2 KiB
YAML
94 lines
2.2 KiB
YAML
on:
|
|
push:
|
|
branches-ignore:
|
|
- "master"
|
|
- "dependabot/**"
|
|
paths-ignore:
|
|
- ".*"
|
|
- "README.md"
|
|
- "tsconfig.json"
|
|
- "nodemon.json"
|
|
|
|
permissions:
|
|
checks: write
|
|
contents: write
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: latest
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: "pnpm"
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name github-actions[bot]
|
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run ESLint
|
|
run: node_modules/.bin/eslint --fix .
|
|
|
|
- name: Check if files have been modified
|
|
id: mod_check
|
|
run: |
|
|
[[ $(git status -s | wc -l) -le 1 ]] \
|
|
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|
|
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Commit and push changes
|
|
if: steps.mod_check.outputs.is-dirty == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "Apply linter fixes"
|
|
git push
|
|
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: latest
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: "pnpm"
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name github-actions[bot]
|
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run Prettier
|
|
run: node_modules/.bin/prettier -w .
|
|
|
|
- name: Check if files have been modified
|
|
id: mod_check
|
|
run: |
|
|
[[ $(git status -s | wc -l) -le 1 ]] \
|
|
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|
|
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Commit and push changes
|
|
if: steps.mod_check.outputs.is-dirty == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "Apply prettier formatting"
|
|
git push
|