diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fe2edd..ec7921e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,13 @@ on: branches: - main # Set this to your default branch +permissions: + contents: read + pages: write + id-token: write + jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,7 +24,6 @@ jobs: - name: Create env file run: | echo "REACT_APP_GOOGLE_MAPS_API_KEY=${{ secrets.REACT_APP_GOOGLE_MAPS_API_KEY }}" >> .env - echo "REACT_APP_GOOGLE_MAPS_MAP_ID=${{ secrets.REACT_APP_GOOGLE_MAPS_MAP_ID }}" >> .env - name: Install dependencies run: npm install @@ -27,8 +31,18 @@ jobs: - name: Build run: CI=false npm run build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build + path: ./build + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4