From f4a3ee655420841e5b6e30eccd201902e2e29947 Mon Sep 17 00:00:00 2001 From: Priyatham-sai-chand Date: Mon, 11 Jan 2021 22:23:46 +0530 Subject: [PATCH] deployment files --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ next.config.js | 3 +++ package.json | 3 ++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 next.config.js diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..52a21b6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build + - run: npm run export + - name: Deploy + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages # The branch the action should deploy to. + FOLDER: out # The folder the action should deploy. \ No newline at end of file diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..01d1468 --- /dev/null +++ b/next.config.js @@ -0,0 +1,3 @@ +module.exports = { + assetPrefix: '/Portfolio/', +} \ No newline at end of file diff --git a/package.json b/package.json index 52bf80e..dc21262 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "next start" + "start": "next start", + "export": "next export" }, "dependencies": { "next": "10.0.5",