Skip to content

Simplify GitHub Actions workflow for deployment to GitHub Pages. #2

Simplify GitHub Actions workflow for deployment to GitHub Pages.

Simplify GitHub Actions workflow for deployment to GitHub Pages. #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Deploy to GitHub Pages
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
yarn deploy
env:
GIT_USER: git
DEPLOYMENT_BRANCH: gh-pages