2020-02-08 21:06:50 +09:00
|
|
|
name: docs
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-02-08 21:41:36 +09:00
|
|
|
- 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-
|
2020-02-08 21:06:50 +09:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with: { node-version: 12 }
|
|
|
|
- run: yarn
|
2020-02-08 21:30:24 +09:00
|
|
|
- run: NEXT_ASSET_PREFIX=/${GITHUB_REPOSITORY#*/} yarn doc
|
2020-02-08 21:06:50 +09:00
|
|
|
- run: git add docs
|
2020-02-08 21:30:24 +09:00
|
|
|
- run: git -c user.name=octocat -c user.email=octocat@github.com commit -m docs
|
2020-02-08 21:33:33 +09:00
|
|
|
- run: git remote add github "https://${NAME}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
2020-02-08 21:06:50 +09:00
|
|
|
env:
|
|
|
|
NAME: octocat
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-02-08 21:52:23 +09:00
|
|
|
- run: git push github HEAD:${GITHUB_REF}
|