Adds GitHub Actions workflow to build user test site similar to beta … #269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Beta Site | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| env: | |
| AWS_DEFAULT_REGION: us-east-2 | |
| REACT_APP_DB_URL: https://phlask-beta.firebaseio.com | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v1-node16 | |
| with: | |
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/beta-access | |
| role-session-name: github-${{ github.sha }} | |
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
| - name: Build and Deploy the Map | |
| run: | | |
| echo Build started on `date` | |
| echo Building the webapp... | |
| docker compose run prod_build | |
| echo Build completed on `date` | |
| echo Pushing the webapp to S3... | |
| aws s3 sync docker/build s3://beta.phlask.me --acl public-read --delete |