Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdjiji committed Nov 7, 2024
1 parent bf5d826 commit bbda250
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitHub Pages - CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install and Build 🔧
run: |
npm install -g pnpm
pnpm install
npm run build
env:
CI: false
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<img src="./assets/logo.svg" align="center" />
![](./assets/logo.svg)

## 特性

- 纯静态,无需后端,部署简单,性能极佳
- 支持采用 GitHub Actions 进行 CI/CD
- 可单独为相册设置问题和答案

## 预览

![](./assets/preview.png)

![](./assets/need_password.png)

## 快速上手

首先,你需要在 GitHub 上选择 `Use this template` 按钮,然后填写相应信息,创建一个新的仓库。编辑 `album` 目录中的 `meta.yml` 文件和里面的照片,然后直接提交到仓库,GitHub Actions 会自动构建并部署到 GitHub Pages。
Expand All @@ -32,7 +38,7 @@ album:
friendly_name: 秘密相册
password: 2008 # 相册密码(可选)
hint: 我出生的年份 # 相册密码提示问题(可选)
preview: IMG_1010.JPG
preview: IMG_1010.jpg
```
## Changelog
Expand Down
Binary file added album/cat/IMG_0001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/cat/IMG_0010.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/cat/IMG_0011.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/cat/IMG_0100.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/cat/IMG_0101.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/foods/IMG_0110.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/foods/IMG_0111.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added album/foods/IMG_1000.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions album/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 1.0
album:
- name: cat
friendly_name: 可爱猫咪
preview: IMG_0100.jpg
- name: foods
friendly_name: 喜欢的食物
password: 法罗群岛
hint: 北欧哪里盛产三文鱼
preview: IMG_0110.jpg
Binary file added assets/need_password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bbda250

Please sign in to comment.