Skip to content

Commit

Permalink
build pages and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXiaoM committed Oct 1, 2024
1 parent eb88c0c commit 6ca54eb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Pages

on:
push:
branches:
- main

permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: deploy
run: |
remote_addr=`git remote get-url --push origin`
commit_info=`git describe --all --always --long`
user_name=`git log -1 --pretty=format:'%an'`
user_email=`git log -1 --pretty=format:'%ae'`
rm data/README
ls data/vocal>data/vocal.txt
ls data/music>data/music.txt
cp -r data www
cd www
git config --global init.defaultBranch gh-pages
git init
git config user.name ${user_name}
git config user.email ${user_email}
git add -A
git commit -m "auto deploy, $commit_info"
remote_addr=`echo $remote_addr | awk -F'://' '{print $2}'`
remote_addr=https://${user_name}:${{secrets.GITHUB_TOKEN}}@${remote_addr}
git remote add origin ${remote_addr}
git push origin HEAD:gh-pages --force
1 change: 1 addition & 0 deletions data/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
在这个文件夹中存放歌声、背景音轨文件 (待定)

0 comments on commit 6ca54eb

Please sign in to comment.