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

26 lines
910 B
YAML
Raw Normal View History

2020-02-09 00:16:12 +09:00
name: github-pages
2020-02-08 23:18:09 +09:00
on:
push:
branches: [master]
2020-02-08 21:06:50 +09:00
jobs:
main:
runs-on: ubuntu-latest
2020-02-09 01:07:01 +09:00
env:
EMAIL: octocat@github.com
2020-02-08 21:06:50 +09:00
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
- run: yarn
2020-02-09 01:09:04 +09:00
- run: git -c user.name="$(whoami)" subtree add --prefix docs origin gh-pages
2020-06-11 22:10:26 +09:00
- run: NEXT_PUBLIC_BASE_PATH=/${GITHUB_REPOSITORY#*/} yarn doc
2020-02-08 23:00:29 +09:00
- run: git add -f docs
2020-02-09 01:07:01 +09:00
- run: git -c user.name="$(whoami)" commit -m github-pages
2020-02-08 22:10:44 +09:00
- run: git remote add github "https://github:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
2020-02-08 22:06:47 +09:00
env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }
2020-02-09 00:19:30 +09:00
- run: git subtree push --prefix docs github gh-pages