Skip to content

Commit

Permalink
fix: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
201flaviosilva committed May 2, 2024
1 parent 0eacb76 commit 137e876
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 45 deletions.
26 changes: 1 addition & 25 deletions .github/workflows/GithubPagesDeploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# Tutorial: https://tigeroakes.com/posts/til-github-pages-two-branches-github-actions/

name: Github Pages Deploy

on:
push:
branches:
- master
- "V1-FE-Vanilla-Site"
- "V2-Phaser-Game"
- "PDF"
pull_request:
branches:
- master
- "V1-FE-Vanilla-Site"
- "V2-Phaser-Game"
- "PDF"

jobs:
build:
Expand All @@ -31,32 +25,14 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
node-version: 17
node-version: 20

- name: Install npm dependencies
run: npm ci

- name: Build # Output build files in `dist` folder
run: npm run build

# ------- V1-FE-Vanilla-Site --------
- name: Checkout the `V1-FE-Vanilla-Site` branch
uses: actions/checkout@v2
with:
ref: V1-FE-Vanilla-Site
# Put the checked out files inside the `dist/V1` folder
path: dist/V1
clean: false

# ------- PDF --------
- name: Checkout the `PDF` branch
uses: actions/checkout@v2
with:
ref: PDF
# Put the checked out files inside the `dist/PDF` folder
path: dist/PDF
clean: false

# ------- gh-pages (deploy) --------
- name: Deploy in gh-pages
uses: JamesIves/github-pages-deploy-action@4.1.1
Expand Down
24 changes: 4 additions & 20 deletions src/Scenes/Index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DOM } from "201flaviosilva-utils";

import StarsBackground from "../Components/StarsBackground";
import GlobalConfigs from "../Configs";
import { TextStyle } from "../Theme";
import StarsBackground from "../Components/StarsBackground";

export default class Index extends Phaser.Scene {
constructor() {
Expand Down Expand Up @@ -32,9 +32,9 @@ export default class Index extends Phaser.Scene {
}

create() {
const { width, height, middleWidth, middleHeight } = GlobalConfigs.screen;
const { middleWidth, middleHeight } = GlobalConfigs.screen;

const margin = 75;
const margin = 36;

// Background
const background = new StarsBackground(this);
Expand All @@ -47,14 +47,6 @@ export default class Index extends Phaser.Scene {
action: () => this.scene.start("Start"),
});

// V1
this.createText({
x: middleWidth,
y: middleHeight,
text: "Vetus",
action: () => this.openV1(),
});

// PDF
this.createText({
x: middleWidth,
Expand All @@ -64,16 +56,8 @@ export default class Index extends Phaser.Scene {
});
}

openV1() {
const url = "/V1/index.html";
const s = window.open(url, "_blank");

if (s && s.focus) s.focus();
else if (!s) window.location.href = url;
}

openPDF() {
const url = "/PDF/indexEN.html";
const url = "https://github.com/201flaviosilva/201flaviosilva.github.io/blob/PDF/FlavioSilva.pdf";
const s = window.open(url, "_blank");

if (s && s.focus) s.focus();
Expand Down

0 comments on commit 137e876

Please sign in to comment.