From b23997f1a98e658c9819affd4c55eb623a7e52e4 Mon Sep 17 00:00:00 2001 From: Marco Argentieri <3596602+tiero@users.noreply.github.com> Date: Fri, 6 Jan 2023 23:13:34 +0100 Subject: [PATCH] Create on-push-website.yml --- .github/workflows/on-push-website.yml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/on-push-website.yml 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 }}