Skip to content

Update main.yml

Update main.yml #35

Workflow file for this run

name: Documentation Deployment
on:
push:
branches:
- main
- develop
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
generate-and-deploy:
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
cd docs-beta
npm install
- name: Generate documentation
env:
OPENAI_API_KEY: ${{ secrets.LANA_OPENAI_API_KEY }}
MODEL: ${{ secrets.LANA_MODEL }}
run: |
cd docs-beta
npm install -g yargs
npm install -g lanadoc-cli
lanadoc config --set LANA_OPENAI_API_KEY=$OPENAI_API_KEY
lanadoc config --set LANA_MODEL=$MODEL
lanadoc generate
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
- name: Build Vue.js application
run: |
cd docs-beta
npm run build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-username: ${{ secrets.VERCEL_USERNAME }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
# working-directory: docs-beta
root-directory: docs-beta
production: true