Merge pull request #145 from conceptadev/feature/global-guards #200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs Deploy | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
branches: ["main"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "lts/*" | |
cache: "yarn" | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
"**/node_modules" | |
${{ github.workspace }}/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}- | |
- name: Build | |
working-directory: ./website | |
run: yarn && yarn run build:readme && yarn run build && yarn run export | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/out |