diff --git a/.github/workflows/publish-page.yml b/.github/workflows/publish-page.yml new file mode 100644 index 000000000..3c72b81f7 --- /dev/null +++ b/.github/workflows/publish-page.yml @@ -0,0 +1,41 @@ +# .github/workflows/preview.yml +name: Deploy Github Pages + +on: + push: + branches: + - main + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: ci-${{ github.ref }} + +jobs: + publish: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install and Build + working-directory: docs + run: | + yarn install + yarn build + + - name: Deploy main + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4 + with: + clean-exclude: pr-preview/ + folder: ./docs/build/ + + - name: Deploy preview + if: github.event_name == 'pull_request' + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./docs/build/ \ No newline at end of file diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 96724b901..000000000 --- a/netlify.toml +++ /dev/null @@ -1,5 +0,0 @@ -[build] - base = "docs/" - publish = "docs/public" - command = "yarn build" -