1
0
Fork 0
mirror of https://github.com/kou029w/megabit.git synced 2025-01-31 06:08:03 +00:00
megabit/.github/workflows/docs.yml

26 lines
863 B
YAML
Raw Normal View History

2020-02-10 23:43:45 +09:00
name: github-pages
on:
push:
branches: [master]
jobs:
main:
runs-on: ubuntu-latest
env:
EMAIL: octocat@github.com
steps:
- uses: actions/checkout@v1
- run: echo "::set-env name=YARN_CACHE_DIR::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ env.YARN_CACHE_DIR }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-
- run: yarn
- run: git -c user.name="$(whoami)" subtree add --prefix docs origin gh-pages
2020-02-10 23:57:31 +09:00
- run: yarn doc
2020-02-10 23:43:45 +09:00
- run: git add -f docs
- run: git -c user.name="$(whoami)" commit -m github-pages
- run: git remote add github "https://github:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }
- run: git subtree push --prefix docs github gh-pages