Skip to content

Commit

Permalink
build: configure github action
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausEverWalkingDev committed Oct 23, 2023
1 parent fdb36be commit bb3318e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and Deploy
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: All things angular
uses: AhsanAyaz/[email protected]
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }} # see the Configuration section for how you can create secrets
build_configuration: production # The build environment for the app. please look configurations in your angular.json
base_href: /devcaminhante-org/ # make sure this corresponds to https://<your_username>.github.io/<base_href>/
deploy_branch: gh-pages # The branch the action should deploy to.
angular_dist_build_folder: dist # The folder where your project is supposed to be after running ng build by the action.

permissions:
contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch.
6 changes: 2 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/blog/articles"
"src/assets"
],
"styles": [
"src/styles.css"
Expand Down Expand Up @@ -85,8 +84,7 @@
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/blog/articles"
"src/assets"
],
"styles": [
"src/styles.css"
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@techor/extend": "^2.5.17",
"csstype": "^3.1.2",
"globals": "^13.23.0",
"marked": "^9.1.2",
"ngx-markdown": "^16.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
Expand Down Expand Up @@ -68,6 +69,6 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.2.2"
"typescript": "~5.1.6"
}
}
2 changes: 1 addition & 1 deletion src/app/core/services/article.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ArticleService {
let id = GlobalConstants.FIRST_ID

return this.urls.map((url) => {
return this.httpClient.get(`blog/articles/${url}.md`, { responseType: 'text' })
return this.httpClient.get(`assets/blog/articles/${url}.md`, { responseType: 'text' })
.pipe(map((string): Article => {
const parsedString = {
author: string.split('author: \'')[1].split('\'\n')[0],
Expand Down
2 changes: 1 addition & 1 deletion src/app/routes/blog/article/article.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<main *ngIf="article$ | async as article; else loading">
<h1>{{article.title}}</h1>
<span class="block font:small-caption">por {{ article.author }} em {{ article.date | date: 'dd/MM/yyyy' }}</span>
<markdown class="{m:20}>p" [data]="article.content"></markdown>
<markdown class="{m:20}>p" src="assets/blog/articles/{{article.slug}}.md"></markdown>
</main>

<ng-template #loading>
Expand Down

0 comments on commit bb3318e

Please sign in to comment.