From 1705f6a518167d014edd442a3274d3287eddbcfe Mon Sep 17 00:00:00 2001 From: Brendon Hablutzel <77469216+Brendon-Hablutzel@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:07:44 -0400 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..b712fd3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + permissions: + contents: write + pages: write + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Install dependencies + run: npm install + + - name: Inject API URL + run: echo "REACT_APP_API_URL=${{ env.REACT_APP_API_URL }}" >> .env + + - name: Build project + run: npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build