|
1 | | -name: Deploy Staging |
| 1 | +name: Deploy Expo Web (Staging) |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [main] |
| 5 | + branches: [ main ] |
6 | 6 |
|
7 | 7 | jobs: |
8 | 8 | build-and-deploy: |
9 | 9 | runs-on: ubuntu-latest |
10 | | - environment: staging # add env-level secrets if desired |
11 | | - |
12 | 10 | steps: |
13 | 11 | - uses: actions/checkout@v4 |
14 | 12 |
|
15 | 13 | - uses: actions/setup-node@v4 |
16 | 14 | with: |
17 | | - node-version: 20 |
18 | | - cache: 'npm' |
19 | | - - run: npm ci |
20 | | - - run: npx expo export --platform web --output-dir dist-web |
| 15 | + node-version: '16' |
21 | 16 |
|
22 | | - - name: Build backend container |
23 | | - uses: docker/build-push-action@v5 |
24 | | - with: |
25 | | - context: backend |
26 | | - push: true |
27 | | - tags: ghcr.io/${{ github.repository }}:staging |
| 17 | + - name: Install dependencies |
| 18 | + working-directory: a.eyes |
| 19 | + run: npm ci |
| 20 | + |
| 21 | + - name: Export Web |
| 22 | + working-directory: a.eyes |
| 23 | + run: npx expo export --platform web --output-dir dist-web |
28 | 24 |
|
29 | | - # Example: deploy to AWS Elastic Beanstalk |
30 | | - - name: Deploy to EB |
31 | | - uses: einaregilsson/beanstalk-deploy@v25 |
| 25 | + - name: Deploy to GitHub Pages (staging) |
| 26 | + uses: JamesIves/github-pages-deploy-action@v4 |
32 | 27 | with: |
33 | | - application_name: ai-eyes-staging |
34 | | - environment_name: ai-eyes-staging-env |
35 | | - version_label: github-${{ github.sha }} |
36 | | - bucket_name: ${{ secrets.EB_S3_BUCKET }} |
37 | | - bucket_key: app-${{ github.sha }}.zip |
38 | | - region: us-east-1 |
39 | | - deployment_package: backend/Dockerrun.aws.json |
40 | | - aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} |
41 | | - aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 28 | + branch: gh-pages-staging |
| 29 | + folder: a.eyes/dist-web |
| 30 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments