Skip to content

feat: Add add new resource button #252

feat: Add add new resource button

feat: Add add new resource button #252

Workflow file for this run

name: WebPreview
on:
pull_request:
# pull_request_target:
# types: [labeled, synchronize]
jobs:
call-run-server:
uses: uw-ssec/post-disaster-comms/.github/workflows/run-dev-server.yml@main
add-preview:
runs-on: ubuntu-latest
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# if: contains(github.event.pull_request.labels.*.name, 'preview')
defaults:
run:
working-directory: ./src/support_sphere
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter pub get
# original values are in deployment/values.cloud.yaml
- run: flutter build web --web-renderer html --dart-define=SUPABASE_ANON_KEY=${{ secrets.CLOUD_DB_JWT_ANON_KEY}} --dart-define=SUPABASE_URL=${{ secrets.CLOUD_DB_URL}}
- name: Deploy Website Preview
if: always()
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './src/support_sphere/build/web'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-github-deployment: false
enable-commit-status: false
enable-commit-comment: false
enable-pull-request-comment: true
overwrites-pull-request-comment: true
alias: deploy-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1