Add Husky #179
Workflow file for this run
This file contains 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 Docusaurus to GitHub Pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: | |
- main | |
- master | |
# Runs on each PR | |
pull_request: | |
branches: | |
- master | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy Docusaurus to GitHub Pages | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Build website | |
run: npm run build | |
# Popular action to deploy to GitHub Pages: | |
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | |
- name: Deploy to GitHub Pages | |
if: github.event_name != 'pull_request' | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
external_repository: vipulgupta2048/vipulgupta2048.github.io | |
publish_dir: ./build | |
- name: Deploy to GitHub Pages | |
if: github.event_name != 'pull_request' | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build |