12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- # .github/workflows/deploy.yml
- name: github pages
- on:
- push:
- branches:
- - master
- paths:
- - '.github/workflows/gh-pages.yml'
- - 'docs/**'
- jobs:
- deploy:
- runs-on: ubuntu-18.04
- defaults:
- run:
- working-directory: docs
- steps:
- - uses: actions/checkout@v2
- - name: Setup Node
- uses: actions/setup-node@v2.1.2
- with:
- node-version: '12.x'
- # - name: Get yarn cache
- # id: yarn-cache
- # run: echo "::set-output name=dir::$(yarn cache dir)"
- # - name: Cache dependencies
- # uses: actions/cache@v2
- # with:
- # path: ${{ steps.yarn-cache.outputs.dir }}
- # key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
- # restore-keys: |
- # ${{ runner.os }}-website-
- # - run: yarn install --frozen-lockfile
- # - run: yarn build
- - run: npm install
- - run: npm run build
- - name: Deploy
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./docs/build
|