mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 14:28:04 +00:00
22 lines
820 B
YAML
22 lines
820 B
YAML
name: docs
|
|
on: push
|
|
jobs:
|
|
main:
|
|
runs-on: ubuntu-latest
|
|
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-
|
|
- uses: actions/setup-node@v1
|
|
with: { node-version: 12 }
|
|
- run: yarn
|
|
- run: NEXT_ASSET_PREFIX=/${GITHUB_REPOSITORY#*/} yarn doc
|
|
- run: git add docs
|
|
- run: git -c user.name=bot -c user.email=octocat@github.com commit -m docs
|
|
- run: git remote add github "https://github:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
|
env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }
|
|
- run: git push github HEAD:${GITHUB_REF}
|