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..48b6e2d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index c13faa2..f49ec0f 100644 --- a/package.json +++ b/package.json @@ -1,73 +1,72 @@ { - "name": "devcaminhante-org", - "version": "0.1.0-SNAPSHOT", - "type": "module", - "engines": { - "node": ">=18.8.0", - "npm": ">=9.8.1" - }, - "private": true, - "scripts": { - "ng": "ng", - "start": "ng serve", - "lint": "eslint .", - "build": "ng build", - "build:dev": "ng build --configuration development", - "serve:prod": "npx lite-server --baseDir='dist'", - "test": "ng test" - }, - "dependencies": { - "@angular/animations": "^16.2.8", - "@angular/common": "^16.2.8", - "@angular/compiler": "^16.2.8", - "@angular/core": "^16.2.8", - "@angular/forms": "^16.2.8", - "@angular/platform-browser": "^16.2.8", - "@angular/platform-browser-dynamic": "^16.2.8", - "@angular/platform-server": "^16.2.8", - "@angular/router": "^16.2.8", - "@master/css": "2.0.0-beta.180", - "@master/normal.css": "2.0.0-beta.84", - "@techor/extend": "^2.5.17", - "csstype": "^3.1.2", - "globals": "^13.23.0", - "ngx-markdown": "^16.0.0", - "rxjs": "~7.8.0", - "tslib": "^2.3.0", - "valibot": "^0.19.0", - "zone.js": "~0.13.0" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^16.2.5", - "@angular-eslint/builder": "^16.2.0", - "@angular-eslint/eslint-plugin": "16.1.1", - "@angular-eslint/eslint-plugin-template": "^16.1.1", - "@angular-eslint/schematics": "^16.2.0", - "@angular-eslint/template-parser": "^16.2.0", - "@angular/cli": "^16.2.5", - "@angular/compiler-cli": "^16.2.8", - "@eslint/js": "^8.51.0", - "@types/jasmine": "~4.3.0", - "@types/jest": "^29.5.5", - "@types/marked": "^6.0.0", - "@types/node": "^16.18.58", - "@typescript-eslint/eslint-plugin": "6.5.0", - "@typescript-eslint/parser": "6.5.0", - "eslint": "^8.51.0", - "eslint-config-prettier": "^9.0.0", - "eslint-config-standard": "^17.1.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsdoc": "^46.8.2", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-unicorn": "^48.0.1", - "jasmine-core": "~4.6.0", - "karma": "~6.4.0", - "karma-chrome-launcher": "~3.2.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "~2.1.0", - "typescript": "~5.2.2" - } + "name": "devcaminhante-org", + "version": "0.1.0-SNAPSHOT", + "type": "module", + "engines": { + "node": ">=18.8.0", + "npm": ">=9.8.1" + }, + "private": true, + "scripts": { + "ng": "ng", + "start": "ng serve", + "lint": "eslint .", + "build": "ng build", + "build:dev": "ng build --configuration development", + "serve:prod": "npx lite-server --baseDir='dist'", + "test": "ng test" + }, + "dependencies": { + "@angular/animations": "^16.2.8", + "@angular/common": "^16.2.8", + "@angular/compiler": "^16.2.8", + "@angular/core": "^16.2.8", + "@angular/forms": "^16.2.8", + "@angular/platform-browser": "^16.2.8", + "@angular/platform-browser-dynamic": "^16.2.8", + "@angular/platform-server": "^16.2.8", + "@angular/router": "^16.2.8", + "@master/css": "2.0.0-beta.180", + "@master/normal.css": "2.0.0-beta.84", + "@techor/extend": "^2.5.17", + "csstype": "^3.1.2", + "globals": "^13.23.0", + "ngx-markdown": "^16.0.0", + "rxjs": "~7.8.0", + "tslib": "^2.3.0", + "valibot": "^0.19.0", + "zone.js": "~0.13.0" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^16.2.5", + "@angular-eslint/builder": "^16.2.0", + "@angular-eslint/eslint-plugin": "16.1.1", + "@angular-eslint/eslint-plugin-template": "^16.1.1", + "@angular-eslint/schematics": "^16.2.0", + "@angular-eslint/template-parser": "^16.2.0", + "@angular/cli": "^16.2.5", + "@angular/compiler-cli": "^16.2.8", + "@eslint/js": "^8.51.0", + "@types/jasmine": "~4.3.0", + "@types/jest": "^29.5.5", + "@types/node": "^16.18.58", + "@typescript-eslint/eslint-plugin": "6.5.0", + "@typescript-eslint/parser": "6.5.0", + "eslint": "^8.51.0", + "eslint-config-prettier": "^9.0.0", + "eslint-config-standard": "^17.1.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jsdoc": "^46.8.2", + "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-unicorn": "^48.0.1", + "jasmine-core": "~4.6.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "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/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