From c12e864a8237fc09e76eff1e1983e38a7b320b02 Mon Sep 17 00:00:00 2001 From: Mateusz Lisewski <115941454+s27288-pj@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:31:23 +0100 Subject: [PATCH] Create static.yml --- .github/workflows/static.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..840912ec --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,40 @@ +name: Deploy Weather App + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.2.0 + with: + branch: gh-pages + folder: build + token: ${{ secrets.GITHUB_TOKEN }} + + # Use the API key in your build process + - name: Set API key + run: echo "REACT_APP_OPENWEATHERMAPAPI=${{ secrets.OPENWEATHERMAPAPI }}" >> .env.production + - name: Set API key + run: echo "REACT_APP_MAPBOXTOKEN=${{ secrets.MAPBOXTOKEN }}" >> .env.production + + # Add any other necessary steps for your deployment