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
42 changes: 35 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev
workflow_dispatch:

permissions:
Expand All @@ -19,33 +20,60 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout current branch
uses: actions/checkout@v4
with:
path: current

- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
path: main-branch

- name: Checkout dev branch
uses: actions/checkout@v4
with:
ref: dev
path: dev-branch

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: monument-valley-demo/package-lock.json
cache-dependency-path: main-branch/monument-valley-demo/package-lock.json

- name: Install dependencies
- name: Build main branch
run: |
cd monument-valley-demo
cd main-branch/monument-valley-demo
npm ci
npm run build

- name: Build
- name: Build dev branch
run: |
cd monument-valley-demo
cd dev-branch/monument-valley-demo
npm ci
# Update base path for dev subdirectory
sed -i "s|base: '/monument/'|base: '/monument/dev/'|g" vite.config.ts
npm run build

- name: Prepare combined deployment
run: |
mkdir -p deployment
# Copy main build to root
cp -r main-branch/monument-valley-demo/dist/* deployment/
# Copy dev build to /dev subdirectory
mkdir -p deployment/dev
cp -r dev-branch/monument-valley-demo/dist/* deployment/dev/

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: monument-valley-demo/dist
path: deployment

deploy:
environment:
Expand Down
2 changes: 1 addition & 1 deletion monument-valley-demo/components/Scene/BuildingBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export const WaterfallBlock: React.FC<BlockProps & { height?: number }> = ({
}, [waterTexture, height]);

useFrame((state, delta) => {
textureInstance.offset.y -= 1.5 * delta;
textureInstance.offset.y += 1.5 * delta;
});

return (
Expand Down
11 changes: 5 additions & 6 deletions monument-valley-demo/components/Scene/LevelOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,8 @@ export const LevelOne: React.FC = () => {
<WaterfallBlock height={14} />
</MovableWrapper>

{/* Beam B: The Short Corner (X Axis) -> Flows to Negative X */}
{/* Previous was [1, 0]. Reversed to [-1, 0]. */}
<MovableWrapper
{/* Beam B: The Short Corner (X Axis) -> Flows to Positive X */}
<MovableWrapper
id="Beam-B"
initialPos={[7.90, 5.50, 5.44]}
isSelected={selectedIds.has('Beam-B')}
Expand All @@ -351,11 +350,11 @@ export const LevelOne: React.FC = () => {
>
<Path
start={[0, 0, 0]}
length={16}
length={16}
axis="x"
color={PALETTE.brickDark}
color={PALETTE.brickDark}
type="water"
flowDirection={[-1, 0]}
flowDirection={[1, 0]}
customBlocks={{
0: { walls: [true, false], endWalls: [true, false] },
15: { endWalls: [false, true] }
Expand Down