From 05581186cde753a3192e9f6f6844fdcee2192004 Mon Sep 17 00:00:00 2001 From: Inna Dmytrenko Date: Sun, 12 Jan 2025 20:26:56 +0100 Subject: [PATCH] added deploy.yml --- .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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..3721483 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "16" + + - name: Install dependencies + run: npm install + + - name: Build the app + run: npm run build + env: + REACT_APP_BASE_URL: ${{ secrets.REACT_APP_BASE_URL }} + REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }} + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build