Skip to content

Commit

Permalink
allow to manually trigger build/deploy to ic cf/s3
Browse files Browse the repository at this point in the history
  • Loading branch information
matt--williams committed Jan 24, 2025
1 parent 48e6031 commit c21b931
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: deploy to ic

on:
workflow_dispatch:
inputs:
branch:
default: 'trunk'
description: 'Branch to build'
required: true
commit_sha:
description: 'Commit sha to build'
required: true

concurrency:
group: ic-${{ github.ref }}
cancel-in-progress: true

jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3
main-branch-name: trunk
init-commands: |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
npx nx-cloud record -- npx nx format:write
parallel-commands-on-agents: |
npx nx affected --target=lint --parallel=3
npx nx affected --target=test --parallel=3 --ci --code-coverage
npx nx affected --target=build --parallel=3
npx nx affected --target=e2e --parallel=3 --ci
artifacts-path: dist/apps
artifacts-name: affected-apps

agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3

deploy:
strategy:
matrix:
client: [ic]
name: Deploy affected applications
needs: [main, agents]
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.IC_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.IC_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
if: matrix.client == 'ic'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'trunk'
- name: Download artifact
id: download-artifact
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: affected-apps
path: dist/apps
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm install
- name: Replace favicons
run: npx nx affected --target=replace-favicon
env:
TENANT: ${{ matrix.client }}
- name: run many deployments
run: npx nx affected --target=deploy:dev

0 comments on commit c21b931

Please sign in to comment.