Add pages workflow

This commit is contained in:
Alexandre Bodin 2022-08-19 18:11:09 +02:00
parent 306d52dcac
commit d1ea986a33

49
.github/workflows/pages.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Deploy static content to Pages
on:
push:
branches:
- 'main'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
defaults:
run:
working-directory: docs
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com