Bye gitlab pages, welcome cd/ci with server

This commit is contained in:
Firq 2023-03-06 19:12:59 +01:00
parent acc66bafeb
commit a674b41d00
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
13 changed files with 45 additions and 31 deletions

View file

@ -1,14 +1,14 @@
image: node:lts deploy-site:
pages: stage: deploy
cache: before_script:
paths: - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- node_modules/ - eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script: script:
- npm install - echo "Connecting to proxmox machine"
- npm run build - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000"
artifacts:
paths:
- public
expire_in: 3 days
only:
- main

14
.old.gitlab-ci.yml Normal file
View file

@ -0,0 +1,14 @@
image: node:lts
pages:
cache:
paths:
- node_modules/
script:
- npm install
- npm run build
artifacts:
paths:
- public
expire_in: 3 days
only:
- main

View file

@ -3,8 +3,8 @@ import { defineConfig } from 'astro/config';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
sitemap: true, sitemap: true,
base: '/fgosite', base: '/',
outDir: 'public', outDir: 'public',
publicDir: 'static', publicDir: 'static',
site: 'https://firq.pages.neshweb.net/fgosite/' site: 'https://firq.dev/'
}); });

View file

@ -1,7 +1,7 @@
{ {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.1.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",

View file

@ -7,8 +7,8 @@ export interface Props {
const {mlb, link, name } = Astro.props; const {mlb, link, name } = Astro.props;
const ce_img: string = `/fgosite/ce/${link}.webp`; const ce_img: string = `/ce/${link}.webp`;
const mlb_ce: string = `/fgosite/ce/mlb.webp` const mlb_ce: string = `/ce/mlb.webp`
let mlb_image: string = "mlbalign"; let mlb_image: string = "mlbalign";
if(mlb === "false") { if(mlb === "false") {

View file

@ -7,7 +7,7 @@ export interface Props {
const {image, origin, name } = Astro.props; const {image, origin, name } = Astro.props;
const img: string = `/fgosite/favourites/${image}.webp`; const img: string = `/favourites/${image}.webp`;
--- ---

View file

@ -2,8 +2,8 @@
--- ---
<header> <header>
<a href="/fgosite/" rel="noopener noreferrer" aria-label="Home"> <a href="/" rel="noopener noreferrer" aria-label="Home">
<img src="/fgosite/logo.svg" alt=""> <img src="/logo.svg" alt="">
</a> </a>
<ul class="desktop"> <ul class="desktop">
<slot /> <slot />

View file

@ -17,7 +17,7 @@ if (currentPage === slug) {
currPage = "current" currPage = "current"
} }
const fulllink = `/fgosite/${slug}`; const fulllink = `/${slug}`;
--- ---
<li> <li>

View file

@ -12,8 +12,8 @@ export interface Props {
const {bond10, ml, image_bond, image_servant, np, skills, level, name } = Astro.props; const {bond10, ml, image_bond, image_servant, np, skills, level, name } = Astro.props;
const servant_img: string = `/fgosite/servant/${image_servant}.webp`; const servant_img: string = `/servant/${image_servant}.webp`;
const bondce_img: string = `/fgosite/ce/bond-ce/${image_bond}.webp` const bondce_img: string = `/ce/bond-ce/${image_bond}.webp`
let bondce_css: string = "bond-ce"; let bondce_css: string = "bond-ce";
if(bond10 === "false") { if(bond10 === "false") {

View file

@ -7,7 +7,7 @@ export interface Props {
const { image, link, title } = Astro.props; const { image, link, title } = Astro.props;
const icon: string = `background: url('/fgosite/ta_icons/${image}.webp')` const icon: string = `background: url('/ta_icons/${image}.webp')`
--- ---
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}> <a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
<article> <article>

View file

@ -7,7 +7,7 @@ export interface Props {
const { image, link, title } = Astro.props; const { image, link, title } = Astro.props;
const icon: string = `background-image: url('/fgosite/technologies/${image}.webp')` const icon: string = `background-image: url('/technologies/${image}.webp')`
--- ---
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}> <a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
<article> <article>

View file

@ -18,7 +18,7 @@ if(descriptionOverride === undefined) {
description = descriptionOverride; description = descriptionOverride;
} }
let currPage = "https://firq.pages.neshweb.net/fgosite/" let currPage = "https://firq.pages.neshweb.net/"
if (currentpage !== "home") { if (currentpage !== "home") {
currPage += currentpage; currPage += currentpage;
} }
@ -29,13 +29,13 @@ if (currentpage !== "home") {
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/ico" href="/fgosite/favicon.ico" /> <link rel="icon" type="image/ico" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<meta property="og:title" content={title} /> <meta property="og:title" content={title} />
<meta property="og:url" content={currPage} /> <meta property="og:url" content={currPage} />
<meta name="description" content={description}/> <meta name="description" content={description}/>
<meta property="og:description" content={description}/> <meta property="og:description" content={description}/>
<meta property="og:image" content="https://firq.pages.neshweb.net/fgosite/link_192.png" /> <meta property="og:image" content="https://firq.pages.neshweb.net/link_192.png" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" /> <meta property="og:locale" content="en_US" />
<title>{title}</title> <title>{title}</title>

View file

@ -21,7 +21,7 @@
Thanks to <a href="https://mitsunee.com" target="_blank" rel="noopener noreferrer">Mitsunee</a> for the support when building this site. I could not have done it without you 🧡 Thanks to <a href="https://mitsunee.com" target="_blank" rel="noopener noreferrer">Mitsunee</a> for the support when building this site. I could not have done it without you 🧡
Check out <a href="https://fgo.mitsunee.com" target="_blank" rel="noopener noreferrer">FGO Timers here</a> Check out <a href="https://fgo.mitsunee.com" target="_blank" rel="noopener noreferrer">FGO Timers here</a>
<div class="sticky-image-wrapper"> <div class="sticky-image-wrapper">
<img src="/fgosite/lurker.png" alt=""> <img src="/lurker.png" alt="">
</div> </div>
</div> </div>
<br> <br>
@ -33,7 +33,7 @@
<div> <div>
Thanks to <a href="https://twitter.com/its_Anthony_J" target="_blank" rel="noopener noreferrer">AnthonyJ</a> for providing me with the custom Shishou favicon. Thanks to <a href="https://twitter.com/its_Anthony_J" target="_blank" rel="noopener noreferrer">AnthonyJ</a> for providing me with the custom Shishou favicon.
<div class="sticky-image-wrapper"> <div class="sticky-image-wrapper">
<img src="/fgosite/padoru.png" alt=""> <img src="/padoru.png" alt="">
</div> </div>
</div> </div>
</footer> </footer>