From 1df1049194b66678fe6cd66922123112abcd5e7e Mon Sep 17 00:00:00 2001 From: Baber Khan Date: Wed, 12 Jun 2024 21:52:49 +0100 Subject: [PATCH] Revert "Update deploy workflow file >> add cname: baberr.com" This reverts commit 7a7c2eb8112898e8f84826ee13637ce4f6dedc21. --- .github/workflows/deploy.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 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..4bdb643 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,49 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + + - name: Install Dependencies + uses: bahmutov/npm-install@v1 + + - name: Build Project + run: npm run build + + - name: Upload Production-Ready Build Files + uses: actions/upload-artifact@v4 + with: + name: production-files + path: ./dist + + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: production-files + path: ./dist + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist