Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkiro authored Nov 16, 2024
0 parents commit 7198cd7
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy static content to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: build-flip-forge
id: build
uses: flip-forge/build-flip-forge@v1
with:
file: "book.pdf"
title: "Book title"
backgroundColor: "#000000"
toolbarColor: "#ffffff"
description: "Book description"
- 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

70 changes: 70 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### Linux template
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.idea
.env
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# deploy-flip-forge

Template repository for generating a flipbook from a PDF file with flip-forge and
deploying it to GitHub pages.

## How to use:

1. Click on "Use this template" in the top right to generate a new repo for your flipbook
2. After the new repo is created, go to Settings -> Pages
3. Change the "Source" option from "Build from branch" to "GitHub Actions"
4. Upload your PDF to the repository, optionally removing/replacing the existing
"book.pdf" one.
5. Edit [.github/workflows/deploy.yml](.github/workflows/deploy.yml) file and change
the following options as needed. Make sure that at least the "file" is set to the
correct PDF file name:
```yaml
with:
file: "book.pdf"
title: "Book title"
backgroundColor: "#000000"
toolbarColor: "#ffffff"
description: "Book description"
```
6. Go to the "actions" tab and wait until the deployment action completes.
7. Visit the generate GitHub page and in order to see your new flipbook.
The link should look something like https://USERNAME.github.io/REPOSITORY/
Binary file added book.pdf
Binary file not shown.

0 comments on commit 7198cd7

Please sign in to comment.