From 34483d0a5fd7f19a388bf2926e0079748409434a Mon Sep 17 00:00:00 2001 From: RodrigoCSolari Date: Wed, 6 Dec 2023 18:49:17 -0300 Subject: [PATCH] chore: test deploy on github pages --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ package.json | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..92a1c44 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: deployment + +on: + push: + branches: [ "test" ] + +jobs: + deploy: + runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [14.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install Packages + run: npm install + - name: Build page + run: npm run build + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build diff --git a/package.json b/package.json index 21f0e85..ac7849c 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,9 @@ "description": "web front-ent for cheddar", "repository": "https://github.com/alpha-fi/cheddar-ui-v1", "scripts": { + "precompile":"yarn build", + "compile":"gh-pages -d build", + "build": "CI=false && react-scripts build", "build:tsc": "tsc --noEmit", "build:prod": "rm -rf dist-prod && parcel build src/index.html --no-cache --log-level verbose --public-url ./ --dist-dir dist-prod", "deploy:pages": "gh-pages -d dist/",