Skip to content

Commit

Permalink
FPO-143: Adds development workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
willfish committed Apr 10, 2024
1 parent e4f1dd4 commit 5536813
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/ci.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: development

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
ref:
description: The branch, tag or SHA to checkout
default: main
type: string

jobs:
test-ruby:
name: Test Ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
show-progress: false
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rake
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_PROXY_PAGES: true
deploy:
runs-on: ubuntu-latest
environment: development
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Build 'build' folder ready for deployment
run: make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install AWS CLI
id: install-aws-cli
uses: unfor19/install-aws-cli-action@master
with:
version: 2
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION}}
run: |
ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
aws s3 cp --recursive build/ s3://trade-tariff-tech-docs-${ACCOUNT_ID}/

0 comments on commit 5536813

Please sign in to comment.