Skip to content

Commit

Permalink
🔀 Merge pull request #20 from AssistantApps/develop
Browse files Browse the repository at this point in the history
🔖 2.0.10
  • Loading branch information
Khaoz-Topsy authored Sep 5, 2024
2 parents ce2bc32 + b4f66e0 commit 49a57c5
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Github Pages
run-name: GithubPages
name: Build Pages
run-name: BuildPages

on:
push:
branches: ['main']
workflow_dispatch:

concurrency:
group: 'githubPages'
group: 'buildPages'
cancel-in-progress: true

permissions:
contents: read
pull-requests: write
contents: write
pages: write
id-token: write

jobs:
githubPages:
name: Github Pages
buildPages:
name: Build Pages
environment: github-pages
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -26,18 +26,13 @@ jobs:
pull-requests: write
contents: write

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Setup variables
Expand All @@ -46,16 +41,18 @@ jobs:
echo POSTHOG_ANALYTICS_CODE="${{ secrets.POSTHOG_ANALYTICS_CODE }}" >> .env
echo ENABLE_SERVICE_WORKER="${{ secrets.ENABLE_SERVICE_WORKER }}" >> .env
- name: Allow webpmux to execute
run: |
chmod +x ./lib/webpmux
chmod +x ./lib/webpmux.exe
- name: Install packages
run: npm ci --force

- name: Build TS
- name: Generate Data and Images for each language
run: |
npm ci --force
# Allow webpmux to execute
chmod +x ./lib/webpmux
# Start the data script
npm run data
npm run build
- name: Build Pages
run: npm run build

- name: Generate service worker
run: |
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Check Pull Request
run-name: CheckPullRequest

on:
pull_request:
types: [opened, synchronize]
branches: main

concurrency:
group: 'pull_request'
cancel-in-progress: true

permissions:
pull-requests: write
contents: write
pages: write

jobs:
paths-filter:
name: Filter out non code changes
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
code-changed: ${{ steps.filter.outputs.src }}

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Filter Changed Files
uses: AurorNZ/paths-filter@v4
id: filter
with:
filters: |
src:
- 'src/**/*'
- '!src/**/*.test.*'
check-version:
needs: paths-filter
if: needs.paths-filter.outputs.code-changed == 'true'
name: Version number was bumped
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Get New Version
run: |
new_version=$(npm pkg get version | xargs)
echo "NEW=${new_version}" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: main

- name: Get Main Version
run: |
main_version=$(npm pkg get version | xargs)
echo "MAIN=${main_version}" >> $GITHUB_ENV
- name: Compare Versions
run: |
if [[ ${{ env.NEW }} == ${{ env.MAIN }} ]]; then
exit 1
fi
- name: Post PR Comment
if: failure()
uses: mshick/add-pr-comment@v2
with:
message: Please bump the version in package.json!
refresh-message-position: true
allow-repeats: true

test-build:
needs: paths-filter
if: needs.paths-filter.outputs.code-changed == 'true'
name: Build pages step is successful
runs-on: ubuntu-latest
timeout-minutes: 5

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'

- name: Install packages
run: npm ci --force

- name: Build Pages
run: npm run build
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"arrayfrom",
"assistantapps",
"astrojs",
"Auror",
"bgcolor",
"browserconfig",
"Bulbasaur",
Expand Down Expand Up @@ -58,6 +59,7 @@
"Lourens",
"Metas",
"msapplication",
"mshick",
"neuquant",
"noselect",
"nositelinkssearchbox",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cassette-beasts-extract",
"version": "2.0.9",
"version": "2.0.10",
"description": "Website generated from data & images extracted from the Cassette Beasts",
"scripts": {
"dev": "astro dev",
Expand Down
2 changes: 2 additions & 0 deletions src/pages/[locale]/fusion/_fusion.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../../scss/scrollbar';

$listItemHeight: 2rem;

.fusion {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[locale]/map/[world]/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const schemaOverride: IGuideSchema = {
<div class="item-detail-card-body">
<h2 class="meta">Images for {data.title_localised}</h2>
<div class="grid images noselect animate__animated animate__fadeIn">
<div class="sprites">
<div class="sprites hidden-in-mobile">
<div class="map-chunk">
<LazyImage
src={`/assets/img/generated/data/map_metadata/${world}${data.id}.png`}
Expand Down
38 changes: 38 additions & 0 deletions src/scss/_scrollbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
*::-webkit-scrollbar {
width: 10px;
background-color: var(--brand-primary-background);

@media screen and (max-width: 800px) {
width: 5px;
}
}

*::-webkit-scrollbar-track {
margin-top: -5px;
margin-bottom: -5px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: var(--brand-primary-background);
}

*::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: var(--brand-secondary);
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}

.scrollbar-contain::-webkit-scrollbar-track {
margin-top: 0;
margin-bottom: 0;
box-shadow: none;
-webkit-box-shadow: none;
}
41 changes: 2 additions & 39 deletions src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@import 'button';
@import 'animate';
@import 'breadcrumb';
@import 'scrollbar';
@import 'responsive';
@import 'assistantApps';

Expand All @@ -23,6 +24,7 @@ $gameCardForeground: #1f1f1f;

:root {
--pico-primary-background: #{$brand-primary} !important;
--brand-primary-background: #{$brand-primary-background};
--brand-primary: #{$brand-primary};
--brand-secondary: #{$brand-secondary};
--brand-tertiary: #{$brand-tertiary};
Expand Down Expand Up @@ -77,45 +79,6 @@ $gameCardForeground: #1f1f1f;
background: $brand-tertiary;
}

*::-webkit-scrollbar {
width: 10px;
background-color: $brand-primary-background;

@media screen and (max-width: 800px) {
width: 5px;
}
}

*::-webkit-scrollbar-track {
margin-top: -5px;
margin-bottom: -5px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: $brand-primary-background;
}

*::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: $brand-secondary;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}

.scrollbar-contain::-webkit-scrollbar-track {
margin-top: 0;
margin-bottom: 0;
box-shadow: none;
-webkit-box-shadow: none;
}

img,
br {
@extend .noselect;
Expand Down

0 comments on commit 49a57c5

Please sign in to comment.