Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .browserslistrc

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

38 changes: 0 additions & 38 deletions .eslintrc.json

This file was deleted.

41 changes: 12 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,22 @@
name: Test-Build ModuleSite
name: Test-build website

# Trigger the workflow on all pull requests
on: pull_request

env:
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}

jobs:
gatsby-build:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["24", "26"]
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
- name: Install Project Dependencies
run: yarn install --frozen-lockfile --immutable
- name: Build ModuleSite
run: yarn run build
gatsby-build-mutable-lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
- name: Install Project Dependencies
run: yarn install
- name: Build ModuleSite
run: yarn run build
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run check
- run: npm run build
50 changes: 12 additions & 38 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: Publish ModuleSite on gh-pages
name: Publish website on GitHub Pages

on:
# Trigger the workflow on push only for master branch
push:
branches:
- master

# Allows to run workflow manually from Actions tab
workflow_dispatch:

# Sets permissions of GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
Expand All @@ -20,44 +16,25 @@ concurrency:
group: "pages"
cancel-in-progress: true

# Default to bash
defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
# TODO: include pages setup action (actions/configure-pages@v2)
# when/after cleaning up path prefix weirdness
# - name: Setup Pages
# id: pages
# uses:
# with:
# # Automatically inject pathPrefix in your Gatsby configuration file.
# static_site_generator: gatsby
- name: Install Project Dependencies
run: yarn install --frozen-lockfile --immutable
- name: Build ModuleSite
run: yarn run build
node-version: "24"
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v6
- run: npm ci
- run: npm run build
- name: Upload artifact
# packaging static assets and uploading artifact that can be deployed to GitHub Pages
# https://github.com/actions/upload-pages-artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
# path to static assets that will be packaged and uploaded
path: ./public
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
Expand All @@ -67,7 +44,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
# action expects artifact named `github-pages` to have been created prior to execution
# this is done automatically using `actions/upload-pages-artifact`
# https://github.com/actions/deploy-pages
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
80 changes: 23 additions & 57 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,40 @@
name: Lint ModuleSite Code
name: Lint website code

# Trigger the workflow on all pull requests with base branch 'master' and commits to 'master'.
on:
pull_request:
branches: [ "master" ]
branches: ["master"]
push:
branches: [ "master" ]
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.MODULE_FETCH_GITHUB_TOKEN }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
- name: Install Project Dependencies
run: yarn install --frozen-lockfile --immutable
- name: Build ModuleSite
run: yarn run build
- name: Upload generated resources
uses: actions/upload-artifact@v4
with:
name: generated
path: src/generated
eslint:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
- name: Install Project Dependencies
run: yarn install --frozen-lockfile --immutable
- name: Download generated resources from build job
uses: actions/download-artifact@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
name: generated
path: src/generated
- name: Lint JavaScript
run: yarn run lint:js --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
- name: Upload analysis results to GItHub
uses: github/codeql-action/upload-sarif@v3
node-version: "24"
cache: npm
- run: npm ci
- name: Lint JavaScript/TypeScript/Astro
run: npm run lint:js -- --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif
- name: Upload analysis results to GitHub
if: always()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
prettier:
format-and-styles:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '18'
# Globally caches yarn dependencies
cache: 'yarn'
- name: Install Project Dependencies
run: yarn install --frozen-lockfile --immutable
- name: Validate JavaScript Formatting
run: yarn run format-check:js
node-version: "24"
cache: npm
- run: npm ci
- run: npm run format:check
- run: npm run lint:css
17 changes: 3 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ jspm_packages
.yarn-integrity


# Build Files
public/
.cache/

# Gatsby context
.gatsby-context.js

# Bundle stats
bundle-stats.json

# Generated JSON
src/generated/
plugins/source-terasology-modules/data.json
plugins/source-terasology-engine/data.json
# Build output and Astro caches
dist/
.astro/
6 changes: 3 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tasks:
- init: yarn install
command: yarn run develop
- init: npm install
command: npm run dev -- --host

ports:
- port: 8000
- port: 4321
onOpen: open-preview
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist/
.astro/
node_modules/
package-lock.json
blog/
public/
*.md
.vscode/
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 100,
"plugins": ["prettier-plugin-astro"],
"overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
}
9 changes: 0 additions & 9 deletions .stylelintrc

This file was deleted.

Loading
Loading