Skip to content

Merge pull request #1 from RoboPIL/gh-pages #9

Merge pull request #1 from RoboPIL/gh-pages

Merge pull request #1 from RoboPIL/gh-pages #9

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Prepare Deployment
run: |
# Create a new directory for deployment
mkdir -p deploy
# Copy only the necessary files
cp -r index.html dist deploy/
# Create .nojekyll to bypass Jekyll processing
touch deploy/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: deploy
branch: gh-pages
clean: true
token: ${{ secrets.GITHUB_TOKEN }}