Skip to content

Commit

Permalink
Add template repo to generate new page more easily
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkiro committed Nov 14, 2024
1 parent cbbe86f commit 2ae8269
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 22 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
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# deploy-flip-forge
# 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 you pdf to repository
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 to until the deploy action completes.
7. Visit the generate GitHub page and to see your new flipbook.
The link should look something like https://USERNAME.github.io/REPOSITORY/

0 comments on commit 2ae8269

Please sign in to comment.