Last active
July 12, 2020 00:59
-
-
Save MitchPierias/2dc7dda9d40205dc231b70979b5412ee to your computer and use it in GitHub Desktop.
A simple GitHub Actions setup to get your static site continuous integration and deployment piepline started
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
name: Piepline | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
# Clone repo and checkout project | |
- name: Fetch source | |
uses: actions/checkout@v2 | |
# Configure environment | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
# Install dependencies | |
- name: Install Dependencies | |
run: yarn | |
# Build project | |
- name: Build Project | |
run: yarn build | |
- 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 }} | |
# Release build to S3 | |
- name: Deploy Build to S3 | |
run: aws s3 sync ./dist/ s3://${{ secrets.AWS_BUCKET_STORYBOOK }} --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment