diff --git a/.github/workflows/on-push-website.yml b/.github/workflows/on-push-website.yml new file mode 100644 index 0000000..16e349b --- /dev/null +++ b/.github/workflows/on-push-website.yml @@ -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 }}