Created
July 17, 2020 03:17
-
-
Save albisserAdrian/8e95667ef69fe3b8f5d26a98b78e74cf to your computer and use it in GitHub Desktop.
Monorepo react-app to S3 GitHub action.
This file contains hidden or 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
name: Client Build | |
on: | |
push: | |
branches: | |
- master | |
defaults: | |
run: | |
working-directory: <DIRECTORY_PATH> | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Publish Client | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Yarn Install | |
run: | | |
yarn install | |
- name: Yarn Build | |
run: | | |
yarn build | |
- name: Deploy static site to S3 bucket | |
run: aws s3 sync ./build s3://<S3_BUCKET_NAME> --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment