From 2e3f51954b9b771f343decda2eea7b5807d81c43 Mon Sep 17 00:00:00 2001 From: Aashutosh Rathi Date: Thu, 1 Aug 2024 12:57:16 +0530 Subject: [PATCH] add workflow for deploying --- .github/workflows/pages.yml | 36 ++++++++++++++++++++++++++++++++++++ client/index.html | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..4fcea00 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,36 @@ +name: Update Deployment + +on: + push: + branches: + - "*" + +jobs: + publish: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Install dependencies + run: cd client && npm install + + - name: Remove build directory from .gitignore + run: sed -i '/build/d' .gitignore + + - name: Generate your content + run: npm run build:client + + - name: Publish current workdir (which contains generated content) to GitHub Pages + uses: rayluo/github-pages-overwriter@v1.3 + + with: + source-directory: client + target-branch: gh-pages diff --git a/client/index.html b/client/index.html index 648eee7..b1d7c87 100644 --- a/client/index.html +++ b/client/index.html @@ -15,6 +15,6 @@
- +