diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..532d2e40 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: Deploy Website to GitHub Pages + +on: + push: + branches: + - v5/build-next-proj + paths: + - "reactgrid/**" + - "website/**" + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + run: | + git clone ${{ github.repository_url }} . + git checkout ${{ github.sha }} + + - name: Setup Node.js + run: | + curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - + sudo apt-get install -y nodejs + + - name: Install dependencies for the whole workspace + run: | + npm install + + - name: Build all packages (reactgrid and website) + run: | + npm run build --workspaces + + - name: Deploy to GitHub Pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + npm install -g gh-pages + gh-pages -d website/out -b gh-pages