Build a static page with flip-forge from a PDF. Current only works on ubuntu workflows.
- name: build-flip-forge
id: build
uses: flip-forge/build-flip-forge@v1
with:
# REQUIRED! Path to the PDF file that will be converted to a flipbook
file: "book.pdf"
# Meta title used as the HTML page title:
title: "Flipbook with flip-forge"
# Background color of the generated web page
backgroundColor: "#000000"
# Toolbar color used in the generate web page
toolbarColor: "#ffffff"
# Meta description used in the generated web pages
description: "Flipbook description"
dist
points to the dist folder with the generated static files. Example usage for GitHub pages:- name: build-flip-forge id: build uses: flip-forge/build-flip-forge@v1 with: file: "book.pdf" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ${{ steps.build.outputs.dist }} - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4
Requirements:
- node (>=20)
- poppler-utils
Steps to setup the project for developing/contributing:
- Clone repo
- Install dependencies
npm install
- Create a local build:
- you can use either the sample PDF from the repo
npm run build-test
- or use your own PDF
npx tsx build/cli.ts --writeEnv "path/to/your/pdf-file.pdf"
- you can use either the sample PDF from the repo
- Run dev server
npm run dev
To run tests, you must first create the default test build:
npm run build-test
Running options:
- Open interactive Cypress test runner and manually run specs from there
npm run test:e2e:dev
- To run the full suite headless:
npm run test:e2e
- To run a single spec headless
npm run test:e2e -- -s cypress/e2e/book.cy.ts