Workflows for automatic deployment of docs site (#1302)

This commit is contained in:
David Rodríguez 2022-04-07 19:31:03 +02:00 committed by GitHub
parent ce753373c6
commit 0e120fc3cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 0 deletions

35
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs
- name: Build website
run: yarn build
working-directory: docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build

29
.github/workflows/test-deploy.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Test deploy to GitHub Pages
on:
pull_request:
branches:
- main
jobs:
test-deploy:
name: Test deploy to GitHub Pages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs
- name: Test build website
run: yarn build
working-directory: docs