Implementing automatic distribution of AWS product S3 through GitHub Actions operation.
Notifications over Slack using through GitHub Actions
Create smart aws diagrams Cloudcraft
Whether you're looking for compute power, database storage, content delivery, or other features with services operated by Amazon,
AWS has services to help you build sophisticated applications with increased flexibility, scalability, and reliability.
Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.
This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics.
▾ Amazon S3 works
GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub.
Make code reviews, branch management, and issue triaging work the way you want.
Slack is a collaboration hub that can replace email to help you and your team work together seamlessly.
Github Actions to build your workflows yml files.
Add a *.yml
file to your source code repository to tell Github Actions.
▾ build.yml
name: S3 Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@master
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
run: npm install
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
[dist folder] s3://[s3 bucket name]
- name: Notification
uses: 8398a7/[email protected]
with:
status: ${{ job.status }}
author_name: [slack chatbot name]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}