diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..487b40a --- /dev/null +++ b/.github/workflows/main.yml @@ -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/angular-deploy-gh-pages-actions@v1.4.0 + 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://.github.io// + 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. diff --git a/angular.json b/angular.json index 2bc857b..ef0a661 100644 --- a/angular.json +++ b/angular.json @@ -22,8 +22,7 @@ "tsConfig": "tsconfig.app.json", "assets": [ "src/favicon.ico", - "src/assets", - "src/blog/articles" + "src/assets" ], "styles": [ "src/styles.css" @@ -85,8 +84,7 @@ "tsConfig": "tsconfig.spec.json", "assets": [ "src/favicon.ico", - "src/assets", - "src/blog/articles" + "src/assets" ], "styles": [ "src/styles.css" diff --git a/bun.lockb b/bun.lockb index 91b126a..b9b53dd 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index c13faa2..e78a16e 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } } diff --git a/src/app/core/services/article.service.ts b/src/app/core/services/article.service.ts index 6eee4c6..da9132e 100644 --- a/src/app/core/services/article.service.ts +++ b/src/app/core/services/article.service.ts @@ -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], diff --git a/src/app/routes/blog/article/article.component.html b/src/app/routes/blog/article/article.component.html index e3fa03a..1404800 100644 --- a/src/app/routes/blog/article/article.component.html +++ b/src/app/routes/blog/article/article.component.html @@ -1,7 +1,7 @@

{{article.title}}

por {{ article.author }} em {{ article.date | date: 'dd/MM/yyyy' }} - +
diff --git a/src/blog/articles/2021-07-07_e-nos-tornamos-devcaminhantes.md b/src/assets/blog/articles/2021-07-07_e-nos-tornamos-devcaminhantes.md similarity index 100% rename from src/blog/articles/2021-07-07_e-nos-tornamos-devcaminhantes.md rename to src/assets/blog/articles/2021-07-07_e-nos-tornamos-devcaminhantes.md