Skip to content

Update deploy.yml

Update deploy.yml #3

Workflow file for this run

name: Deploy Emerald UI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm install --prefer-offline
- name: Deploy to GitHub Pages
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm run build
# Use specific token authentication method for gh-pages
npx gh-pages -d dist -u "github-actions-bot <support+actions@github.com>" -r https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}