Fix graphql url #133
This file contains 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
# TODO: Skip the local build by using skip_app_build. Use an artifact instead | |
# TODO: yarn install --frozen-lockfile --ignore-scripts to skip postinstall | |
# TODO: use app_build_command to create a custom build script | |
name: Release Frontend | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "api/**" | |
jobs: | |
staging_deployment: | |
environment: | |
name: Staging | |
url: https://staging.app.fencing.club | |
runs-on: ubuntu-latest | |
name: Deploy to Staging | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Get Yarn Cache | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache Dependencies | |
id: deps-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts | |
- name: Build Frontend | |
run: yarn build:web --mode staging | |
- name: Deploy Frontend | |
id: deploystaging | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
production_branch: "main" | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_COAST_047525A1E }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
action: "upload" | |
app_location: "/dist" | |
api_location: "" | |
output_location: "/dist" | |
skip_app_build: true | |
production_deployment: | |
environment: | |
name: Production | |
url: https://app.fencing.club | |
needs: staging_deployment | |
runs-on: ubuntu-latest | |
name: Deploy to Production | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Get Yarn Cache | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache Dependencies | |
id: deps-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts | |
- name: Build Frontend | |
run: yarn build:web --mode production | |
- name: Deploy Frontend | |
id: deployproduction | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
production_branch: "main" | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_BEACH_056E5171E }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
action: "upload" | |
app_location: "/dist" | |
api_location: "" | |
output_location: "/dist" | |
skip_app_build: true |