Skip to content

Instantly share code, notes, and snippets.

@TKadyear
Created May 31, 2022 10:16
Show Gist options
  • Save TKadyear/a6e15abc65a76525f0551e053f499987 to your computer and use it in GitHub Desktop.
Save TKadyear/a6e15abc65a76525f0551e053f499987 to your computer and use it in GitHub Desktop.
Workflow Deploy with gh-pages
name: 🚀Deploy
on:
push:
branches:
- main
jobs:
deploy-to-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: 👩🏽‍💻 Git User Config
run: |
git config --global user.email "nombre-correo@correo.com"
git config --global user.name "nombre-usuario"
- name: ⚒ Install Dependencies
run: npm install
- name: ⚙ Build
run: npm run build
- name: Deploy
run: npm run deploy
- name: 🚀 Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment