Skip to content

Update deploy.yml

Update deploy.yml #14

Workflow file for this run

name: Build React Webpage
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: 16.x
- name: Enable Corepack
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Configure Yarn
run: |
yarn set version stable
yarn config set nodeLinker node-modules
- name: Install dependencies
run: yarn install --immutable
- name: Build the application
env:
PUBLIC_URL: https://lamda-lab.github.io
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build