From bcb6889e2007f377a53871a8bf34a9fe1effabe4 Mon Sep 17 00:00:00 2001 From: Vishal Dhanotiya <34983293+vishaldhanotiya@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:11:54 +0530 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..86f0922 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Publish Netlify +on: + workflow_dispatch: + push: + branches: + - My-portfile + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Yarn install + run: yarn install --prefer-offline --frozen-lockfile + + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Build + run: yarn build-web + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v2 + with: + publish-dir: './web-build' + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: 'Staging Deploy from GitHub Actions' + production-deploy: true + github-deployment-description: 'My Portfolio Website' + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}