Skip to content

website: update footer. #186

website: update footer.

website: update footer. #186

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
ghpage:
if: github.repository == 'jaywcjlove/free-font'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- run: mkdir -p website
- name: Create info.html page.
working-directory: website
run: |
cat > info.html << EOF
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Free Font - 收录商用免费字体,包括汉字和英文字体,提供免费下载和使用。">
<meta name="keywords" content="免费字体, 商用字体, 汉字字体, 英文字体, 字体下载, 免费商用字体, free fonts, commercial free fonts, Chinese fonts, English fonts, font download, free commercial fonts">
<meta name="author" content="jaywcjlove">
<title>Free Font - 收录商用免费字体(汉字英文字体)</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
h1 { font-size: 3em; }
h2 { font-size: 24px; font-weight: 400; }
a { background: #2196F3; color: #fff; display: inline-block; text-decoration: none; border-radius: 4px; padding: 5px 8px; transition: all 0.3s; }
a:hover { background: #001eff; }
</style>
</head>
<body onload="startCountdown(10)">
<div>
<h1>Free Font 免费可商用字体</h1>
<p style="font-size: 2em;">倒计时: <span id="countdown">10</span></p>
<h2>页面将在 10 秒钟后自动跳转到<b>镜像网站</b></h2>
<p style="color: red;">⚠️ GitHub Page 因体积太大已无法更新,最新更新,访问下面镜像网站</p>
<div>
<a href="https://raw.githack.com/jaywcjlove/free-font/main/docs/index.html" target="_blank">githack.com</a> &nbsp;
<a href="https://free-font.vercel.app" target="_blank">vercel.app</a>
<a href="https://freefont.netlify.app" target="_blank">netlify.app</a>
</div>
<p style="font-weight: 300;">欢迎部署镜像网站,镜像网站将放到这里提供给大家选择</p>
</div>
<script>
function startCountdown(seconds) {
const countdownElement = document.getElementById('countdown');
let remainingTime = seconds;
const interval = setInterval(() => {
if (remainingTime <= 0) {
clearInterval(interval);
countdownElement.parentElement = "正在跳转到 Free Font 页面...";
setTimeout(function() {
window.location.href = "https://free-font.vercel.app/";
}, 1000);
} else {
countdownElement.textContent = remainingTime;
remainingTime--;
}
}, 1000);
}
</script>
</body>
</html>
EOF
- name: Move static resource files
run: |
cp docs/*.html ./website
cp -rp docs/css ./website
cp -rp docs/icons ./website
cp -rp docs/images ./website
- name: Create README.md
working-directory: website
run: |
cat > README.md << EOF
GitHub [Page](https://jaywcjlove.github.io/free-font/) ,镜像网站访问:[\`Githack\`](https://raw.githack.com/jaywcjlove/free-font/main/docs/index.html)、[\`Vercel\`](https://free-font.vercel.app)、[\`Netlify\`](https://freefont.netlify.app)
EOF
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website
build:
if: github.repository == 'jaywcjlove/free-font'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
# - run: npm install
# - run: npm run start
- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./package.json
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
filter-author: (小弟调调™|\@github-actions-bot\@renovate-bot|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
gh-pages: main
- name: Create Release
uses: jaywcjlove/create-tag-action@main
if: steps.create_tag.outputs.successful == 'true'
with:
package-path: ./package.json
version: ${{steps.create_tag.outputs.version}}
release: true
prerelease: false
draft: false
body: |
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
备用历史网站: ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/free-font/${{ steps.changelog.outputs.gh-pages-short-hash }}/docs/index.html
比较变化: ${{ steps.changelog.outputs.compareurl }}
> [!NOTE]
>
> GitHub [Page](https://jaywcjlove.github.io/free-font/) ,镜像网站访问:[`Githack`](https://raw.githack.com/jaywcjlove/free-font/main/docs/index.html)、[`Vercel`](https://free-font.vercel.app)、[`Netlify`](https://freefont.netlify.app)
${{ steps.changelog.outputs.changelog }}