Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush259 committed Nov 12, 2024
1 parent 4a82bcd commit 1b92ac6
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,21 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: npm install

- name: Build project
- name: Build project with environment variables
env:
VITE_API_URL: ${{ secrets.VITE_API_URL }}
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
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@v2
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down

0 comments on commit 1b92ac6

Please sign in to comment.