Skip to content

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # Change this to your main branch name
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies and build
run: |
npm install
cd server && npm run build
# Find the dist directory and set it as an output variable
find . -type d -name "dist" -exec echo "::set-output name=dist_folder::{}" \;
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_PAGES_TOKEN }}
publish_dir: ${{ steps.deploy.outputs.dist_folder }} # Use the dist folder found in the previous step