Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-carvalho authored Jan 30, 2025
1 parent 166f233 commit 5dec0cf
Showing 1 changed file with 37 additions and 7 deletions.
44 changes: 37 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,46 @@
name: Deploy
name: Build and Deploy

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3

- name: Install Dependencies
run: yarn install

- name: Build Project
run: yarn build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-output
path: ./dist

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: yarn install
- run: yarn build
- uses: peaceiris/actions-gh-pages@v4
- name: Checkout Repository
uses: actions/checkout@v3

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: build-output
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./dist

0 comments on commit 5dec0cf

Please sign in to comment.