yaml< ../../.github/workflows/generate.yamlname: Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Generate gh-pages from source
run: |
npm install
npm install -g .
npm run build-web
mkdir build
DEBUG=All,-sections,-codeblocks,-Link,-Viewers dotlit generate -b "/" ./src -o ./build
- name: Deploy 🚀
if: ${{ github.event_name != 'pull_request' }}
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch