Update deploy.yml #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |