diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..7159b30144 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + + - name: Setup Node + uses: actions/setup-node@v4.1.0 + with: + node-version: 23.1.0 + + - name: Install Dependencies + run: cd webpage && npm install + + - name: Deploy + run: | + git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/repairbench/repairbench.github.io.git + cd webpage && npm run deploy + env: + GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} diff --git a/webpage/package.json b/webpage/package.json index d82dabea61..7b7ebb67c0 100644 --- a/webpage/package.json +++ b/webpage/package.json @@ -19,7 +19,7 @@ }, "scripts": { "predeploy": "npm run build", - "deploy": "gh-pages -d build", + "deploy": "CI=false && gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test",