From 84633e47e66196e244fa3498049d812ea621b2e6 Mon Sep 17 00:00:00 2001 From: Bhav Beri Date: Tue, 17 Dec 2024 13:55:00 +0530 Subject: [PATCH] Added auto deployment --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..570d558 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run predeploy + + - name: Deploy to GitHub Pages + run: npm run deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}