Skip to content

Update deploy.yml

Update deploy.yml #4

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'
registry-url: 'https://registry.npmjs.org'
- name: Authenticate with npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm ci --prefer-offline
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- 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
npx gh-pages -d dist -u "github-actions-bot <[email protected]>" -r https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}