From 7d096a93e8cddfe3ae9919736c40e3ec31e1a4da Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 19:47:00 +0300 Subject: [PATCH 01/13] Create nuxtjs.yml --- .github/workflows/nuxtjs.yml | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/nuxtjs.yml diff --git a/.github/workflows/nuxtjs.yml b/.github/workflows/nuxtjs.yml new file mode 100644 index 0000000..422c9e9 --- /dev/null +++ b/.github/workflows/nuxtjs.yml @@ -0,0 +1,93 @@ +# Sample workflow for building and deploying a Nuxt site to GitHub Pages +# +# To get started with Nuxt see: https://nuxtjs.org/docs/get-started/installation +# +name: Deploy Nuxt site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Detect package manager + id: detect-package-manager + run: | + if [ -f "${{ github.workspace }}/yarn.lock" ]; then + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + exit 0 + elif [ -f "${{ github.workspace }}/package.json" ]; then + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + exit 0 + else + echo "Unable to determine package manager" + exit 1 + fi + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "16" + cache: ${{ steps.detect-package-manager.outputs.manager }} + - name: Setup Pages + uses: actions/configure-pages@v3 + with: + # Automatically inject router.base in your Nuxt configuration file and set + # target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/). + # + # You may remove this line if you want to manage the configuration yourself. + static_site_generator: nuxt + - name: Restore cache + uses: actions/cache@v3 + with: + path: | + dist + .nuxt + key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }} + restore-keys: | + ${{ runner.os }}-nuxt-build- + - name: Install dependencies + run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + - name: Static HTML export with Nuxt + env: + GITHUB_API_TOKEN: ${{ secrets.API_TOKEN }} + GITHUB_API_USERNAME: ${{ secrets.API_USERNAME }} + run: ${{ steps.detect-package-manager.outputs.manager }} run generate + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./dist + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From 27b324e11c888b4d040f9c2d58578f0ba749c668 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:10:02 +0300 Subject: [PATCH 02/13] base url added --- .github/workflows/build-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index d3476cf..5511114 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -8,10 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. env: + NUXT_APP_BASE_URL: '/webceyhan.github.io/' GITHUB_API_TOKEN: ${{ secrets.API_TOKEN }} GITHUB_API_USERNAME: ${{ secrets.API_USERNAME }} run: | From 96020a43d25720fb97077ec31a98a136e31270bc Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:20:55 +0300 Subject: [PATCH 03/13] gh-deploy-action upgraded to use node16 --- .github/workflows/build-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 5511114..b595aae 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -20,7 +20,7 @@ jobs: npm run generate - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.2.2 + uses: JamesIves/github-pages-deploy-action@v4.4.3 with: branch: gh-pages # The branch the action should deploy to. folder: .output/public # The folder the action should deploy. From 378448437cfd0f979933e06fac3499c0413e4f1d Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:34:28 +0300 Subject: [PATCH 04/13] disable jekyl processing --- .nojekyll | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .nojekyll diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 From c968f39914635ded2724ee174be7a1961e845e11 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:43:04 +0300 Subject: [PATCH 05/13] runtime build assets dir set --- nuxt.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 853e6e9..4bf1223 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -9,4 +9,10 @@ export default defineNuxtConfig({ pathPrefix: false, // disable path prefix for components }, ], + + app: { + buildAssetsDir: process.env.NODE_ENV === 'production' ? 'assets' : '', + + }, + }); From 076a1d0078f0ddb1dff649e34305123ec90e8688 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:46:53 +0300 Subject: [PATCH 06/13] config cleaned up --- nuxt.config.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 4bf1223..d18d3fd 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,3 +1,5 @@ +const IS_PROD = process.env.NODE_ENV === 'production'; + // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: { enabled: true }, @@ -9,10 +11,7 @@ export default defineNuxtConfig({ pathPrefix: false, // disable path prefix for components }, ], - app: { - buildAssetsDir: process.env.NODE_ENV === 'production' ? 'assets' : '', - + buildAssetsDir: IS_PROD ? 'assets' : undefined, }, - }); From a5edfbbc4c33adccf9190a347c6daee3353c334c Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 20:47:34 +0300 Subject: [PATCH 07/13] base url disabled --- .github/workflows/build-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index b595aae..81fffe5 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -12,7 +12,7 @@ jobs: - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. env: - NUXT_APP_BASE_URL: '/webceyhan.github.io/' + # NUXT_APP_BASE_URL: '/webceyhan.github.io/' GITHUB_API_TOKEN: ${{ secrets.API_TOKEN }} GITHUB_API_USERNAME: ${{ secrets.API_USERNAME }} run: | From cb6a3c60b9176432cef8878431a4b95567d1b4c9 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 21:14:46 +0300 Subject: [PATCH 08/13] nojekyll moved to public folder --- .nojekyll => public/.nojekyll | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .nojekyll => public/.nojekyll (100%) diff --git a/.nojekyll b/public/.nojekyll similarity index 100% rename from .nojekyll rename to public/.nojekyll From 14ed2024cd9d96b1462c83c25aaf9728f1fa4f27 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 21:36:24 +0300 Subject: [PATCH 09/13] remove 200.html after generate --- .github/workflows/build-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 81fffe5..7bef9f2 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -18,6 +18,7 @@ jobs: run: | npm ci npm run generate + rm -f .output/public/200.html - name: Deploy uses: JamesIves/github-pages-deploy-action@v4.4.3 From eae8540cb12b86a5909bd0c795ff708955cc5a3a Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 21:41:26 +0300 Subject: [PATCH 10/13] build assets dir disabled --- nuxt.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index d18d3fd..ae6105c 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,4 +1,4 @@ -const IS_PROD = process.env.NODE_ENV === 'production'; +// const IS_PROD = process.env.NODE_ENV === 'production'; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ @@ -11,7 +11,7 @@ export default defineNuxtConfig({ pathPrefix: false, // disable path prefix for components }, ], - app: { - buildAssetsDir: IS_PROD ? 'assets' : undefined, - }, + // app: { + // buildAssetsDir: IS_PROD ? 'assets' : undefined, + // }, }); From b5b710f669580defc1ccf7152a310f05565d1967 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 21:45:34 +0300 Subject: [PATCH 11/13] obsolete nuxtjs action removed --- .github/workflows/nuxtjs.yml | 93 ------------------------------------ nuxt.config.ts | 5 -- 2 files changed, 98 deletions(-) delete mode 100644 .github/workflows/nuxtjs.yml diff --git a/.github/workflows/nuxtjs.yml b/.github/workflows/nuxtjs.yml deleted file mode 100644 index 422c9e9..0000000 --- a/.github/workflows/nuxtjs.yml +++ /dev/null @@ -1,93 +0,0 @@ -# Sample workflow for building and deploying a Nuxt site to GitHub Pages -# -# To get started with Nuxt see: https://nuxtjs.org/docs/get-started/installation -# -name: Deploy Nuxt site to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Detect package manager - id: detect-package-manager - run: | - if [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "16" - cache: ${{ steps.detect-package-manager.outputs.manager }} - - name: Setup Pages - uses: actions/configure-pages@v3 - with: - # Automatically inject router.base in your Nuxt configuration file and set - # target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: nuxt - - name: Restore cache - uses: actions/cache@v3 - with: - path: | - dist - .nuxt - key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }} - restore-keys: | - ${{ runner.os }}-nuxt-build- - - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - - name: Static HTML export with Nuxt - env: - GITHUB_API_TOKEN: ${{ secrets.API_TOKEN }} - GITHUB_API_USERNAME: ${{ secrets.API_USERNAME }} - run: ${{ steps.detect-package-manager.outputs.manager }} run generate - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: ./dist - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/nuxt.config.ts b/nuxt.config.ts index ae6105c..853e6e9 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,3 @@ -// const IS_PROD = process.env.NODE_ENV === 'production'; - // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: { enabled: true }, @@ -11,7 +9,4 @@ export default defineNuxtConfig({ pathPrefix: false, // disable path prefix for components }, ], - // app: { - // buildAssetsDir: IS_PROD ? 'assets' : undefined, - // }, }); From df25382f95f16246eccbdcfeb458febae9aaf16c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 18:47:16 +0000 Subject: [PATCH 12/13] Bump @types/node from 18.17.5 to 20.5.3 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.17.5 to 20.5.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cc64b7..e818dd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,9 @@ "vue3-particles": "^2.12.0" }, "devDependencies": { - "@nuxt/devtools": "latest", + "@nuxt/devtools": "*", "@nuxtjs/tailwindcss": "^6.8.0", - "@types/node": "^18.17.3", + "@types/node": "^20.5.3", "daisyui": "^3.5.1", "nuxt": "^3.6.5" } @@ -3294,9 +3294,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.17.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.5.tgz", - "integrity": "sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==", + "version": "20.5.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.3.tgz", + "integrity": "sha512-ITI7rbWczR8a/S6qjAW7DMqxqFMjjTo61qZVWJ1ubPvbIQsL5D/TvwjYEalM8Kthpe3hTzOGrF2TGbAu2uyqeA==", "dev": true }, "node_modules/@types/parse-json": { diff --git a/package.json b/package.json index 1e29785..6408270 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "devDependencies": { "@nuxt/devtools": "latest", "@nuxtjs/tailwindcss": "^6.8.0", - "@types/node": "^18.17.3", + "@types/node": "^20.5.3", "daisyui": "^3.5.1", "nuxt": "^3.6.5" }, From 9405f760569bd923c2199cb5646228e324f803d4 Mon Sep 17 00:00:00 2001 From: Evren Ceyhan Date: Tue, 22 Aug 2023 21:58:30 +0300 Subject: [PATCH 13/13] social links added --- .github/workflows/build-deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 7bef9f2..7937bed 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -15,6 +15,12 @@ jobs: # NUXT_APP_BASE_URL: '/webceyhan.github.io/' GITHUB_API_TOKEN: ${{ secrets.API_TOKEN }} GITHUB_API_USERNAME: ${{ secrets.API_USERNAME }} + # social link handles + USER_GITHUB: ${{ vars.USER_GITHUB }} + USER_REDDIT: ${{ vars.USER_REDDIT }} + USER_LINKEDIN: ${{ vars.USER_LINKEDIN }} + USER_TWITTER: ${{ vars.USER_TWITTER }} + USER_INSTAGRAM: ${{ vars.USER_INSTAGRAM }} run: | npm ci npm run generate