Remove branch gh-pages instead of push to branch now

This commit is contained in:
Folyd 2020-01-05 00:17:28 +08:00
parent f4cdc2a28c
commit e7629e5ea1
4 changed files with 9 additions and 4 deletions

View file

@ -6,7 +6,7 @@ on:
jobs:
build:
name: Deploy to Github Pages
name: Deploy to now branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

5
now.json Normal file
View file

@ -0,0 +1,5 @@
{
"github": {
"silent": true
}
}

View file

@ -2,7 +2,7 @@
set -e
CRATES_INDEX_PATH="/tmp/crates-index.js"
BRANCH="gh-pages"
BRANCH="now"
build() {
echo "Starting building crates-index..."

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
BRANCH="gh-pages"
BRANCH="now"
build() {
echo "Starting building..."
@ -23,7 +23,7 @@ deploy() {
git config user.name "GitHub Actions"
git config user.email "github-actions-bot@users.noreply.github.com"
git add .
git commit -m "Deploy new version to Github Pages"
git commit -m "Deploy new version docs"
git push --force "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" ${BRANCH}
echo "Deploy complete"