Added demographics + automated metrics/state send #34
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: Deploy Gamified-MST webpage on push | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'gamified-mst/**' | |
| - '.github/workflows/deploy.yaml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.9.0' | |
| - name: List files in directory | |
| run: ls gamified-mst | |
| - name: Set environment variable | |
| run: | | |
| echo "NEXT_PUBLIC_CLOUDFRONT_URL=${{ secrets.NEXT_PUBLIC_CLOUDFRONT_URL }}" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_AWS_METRICS_API=${{ secrets.NEXT_PUBLIC_AWS_METRICS_API }}" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_PROLIFIC_COMPLETE_STUDY=${{ secrets.NEXT_PUBLIC_PROLIFIC_COMPLETE_STUDY }}" >> $GITHUB_ENV | |
| echo "NEXT_PUBLIC_PROLIFIC_NO_CONSENT=${{ secrets.NEXT_PUBLIC_PROLIFIC_NO_CONSENT }}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: gamified-mst | |
| - name: Build the app | |
| run: CI=false npm run build | |
| working-directory: gamified-mst | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: gamified-mst/out | |
| publish_branch: Website_Deployment | |
| cname: mst.medtech-uci.com |