Create on-push-website.yml

This commit is contained in:
Marco Argentieri
2023-01-06 23:13:34 +01:00
committed by GitHub
parent 5a88dd6491
commit b23997f1a9

29
.github/workflows/on-push-website.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Github Pages for Website
on:
workflow_dispatch:
push:
branches: [master]
jobs:
website:
runs-on: ubuntu-latest
defaults:
run:
working-directory: example
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: example/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}