-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
在这个文件夹中存放歌声、背景音轨文件 (待定) |