Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vishaldhanotiya authored Jun 24, 2024
1 parent cd74506 commit bcb6889
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit bcb6889

Please sign in to comment.