Merge branch 'develop' into 'master'

minor updates due to domain changes, project filtering and cicd

See merge request inkletblot/inkletblot-com-v2!15
This commit is contained in:
Solomon Laing 2021-07-07 05:30:31 +00:00
commit 26cc45cb45
4 changed files with 35 additions and 8 deletions

View File

@ -44,8 +44,8 @@ deploy-job:
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
script: script:
- tar zcf ../inkletblot-com.tar.gz ./dist - tar zcf ../inkletblot-com.tar.gz ./dist
- scp -P "$Live_Server_Access_Port" -o StrictHostKeyChecking=no ../inkletblot-com.tar.gz "$Live_Server_User"@"$Live_Server_IP":/var/www/html - scp -o 'ProxyJump "$Live_Server_User"@"$Live_Server_IP"' -o StrictHostKeyChecking=no ../inkletblot-com.tar.gz "$Live_Server_User"@"$Live_Server_Target":/var/www/html
- ssh -p "$Live_Server_Access_Port" "$Live_Server_User"@"$Live_Server_IP" "rm -Rf /var/www/html/inkletblot-com_old && mv /var/www/html/inkletblot-com /var/www/html/inkletblot-com_old && mkdir /var/www/html/inkletblot-com_build && mkdir /var/www/html/inkletblot-com && tar zxf /var/www/html/inkletblot-com.tar.gz -C /var/www/html/inkletblot-com_build && mv /var/www/html/inkletblot-com_build/dist/inkletblot-com/* /var/www/html/inkletblot-com && rm -Rf /var/www/html/inkletblot-com_build && chmod -R 755 /var/www/html/inkletblot-com && exit" - ssh -J "$Live_Server_User"@"$Live_Server_IP" "$Live_Server_User"@"$Live_Server_Target" "rm -Rf /var/www/html/inkletblot-com_old && mv /var/www/html/inkletblot-com /var/www/html/inkletblot-com_old && mkdir /var/www/html/inkletblot-com_build && mkdir /var/www/html/inkletblot-com && tar zxf /var/www/html/inkletblot-com.tar.gz -C /var/www/html/inkletblot-com_build && mv /var/www/html/inkletblot-com_build/dist/inkletblot-com/* /var/www/html/inkletblot-com && rm -Rf /var/www/html/inkletblot-com_build && chmod -R 755 /var/www/html/inkletblot-com && exit"
only: only:
- master - master

View File

@ -1,8 +1,10 @@
<h2>Projects on git</h2> <h2>Projects on git</h2>
<p>These are my projects as can be found on my <a href="https://gitlab.inkletblot.com/explore">gitlab</a>. Mainly my programming projects that are quality enough for me to be happy for the world to see them. There are more in the works but they are currently private.</p> <p>These are my projects as can be found on my <a href="https://gitlab.inkletblot.com/explore">gitlab</a>. Mainly my programming projects that are quality enough for me to be happy for the world to see them. There are more in the works but they are currently private.</p>
<app-project-card *ngFor="let project of gitlabProjects()" [project]="project">
</app-project-card>
<h2>Projects of a personal nature</h2> <h2>Projects of a personal nature</h2>
<p>This is (will be) a summary of my personal projects be they my homelab, general electronics projects, or anything else.</p> <p>This is (will be) a summary of my personal projects be they my homelab, general electronics projects, or anything else.</p>
<app-project-card *ngFor="let project of uncategorizedProjects" [project]="project"> <app-project-card *ngFor="let project of uncategorizedProjects()" [project]="project">
</app-project-card> </app-project-card>

View File

@ -14,7 +14,9 @@ import { ProjectsService } from './projects.service';
export class ProjectsComponent implements OnInit, OnDestroy { export class ProjectsComponent implements OnInit, OnDestroy {
_unsubscribe$: Subject<boolean> = new Subject(); _unsubscribe$: Subject<boolean> = new Subject();
uncategorizedProjects: Array<Project>; allProjects: Array<Project>;
private _gitlabProjects: Array<Project> = new Array<Project>();
private _uncategorizedProjects: Array<Project> = new Array<Project>();
constructor(private navService: NavService, private projectsService: ProjectsService) { } constructor(private navService: NavService, private projectsService: ProjectsService) { }
@ -24,8 +26,9 @@ export class ProjectsComponent implements OnInit, OnDestroy {
this.projectsService.allProjects$ this.projectsService.allProjects$
.pipe(takeUntil(this._unsubscribe$)) .pipe(takeUntil(this._unsubscribe$))
.subscribe((result: Project[]) => { .subscribe((result: Project[]) => {
this.uncategorizedProjects = result; this.allProjects = result;
}); });
this.projectsService.getProjects(); this.projectsService.getProjects();
} }
@ -34,4 +37,26 @@ export class ProjectsComponent implements OnInit, OnDestroy {
this._unsubscribe$.complete(); this._unsubscribe$.complete();
} }
filterProjects(): void {
this._gitlabProjects = [];
this._uncategorizedProjects = [];
this.allProjects.forEach((project) => {
if (project.category === 'gitlab') {
this._gitlabProjects.push(project);
} else {
this._uncategorizedProjects.push(project);
}
})
}
gitlabProjects(): Array<Project> {
this.filterProjects();
return this._gitlabProjects;
}
uncategorizedProjects(): Array<Project> {
this.filterProjects();
return this._uncategorizedProjects;
}
} }

View File

@ -17,15 +17,15 @@ export const Links: Array<Link> =
}, },
{ {
name: "known", name: "known",
location: "https://www.inkletblot.com/known/" location: "https://proxy.inkletblot.com/known/"
}, },
{ {
name: "tng", name: "tng",
location: "https://www.inkletblot.com/tng/" location: "https://proxy.inkletblot.com/tng/"
}, },
{ {
name: "pasty", name: "pasty",
location: "https://www.inkletblot.com/pasty/" location: "https://proxy.inkletblot.com/pasty/"
}, },
{ {
name: "mail", name: "mail",