diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..826c73c --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,59 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the main branch +on: + push: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [ 18.x ] + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Yarn Install + run: | + yarn install + - name: Production Build + run: | + yarn build + + - name: S3 Sync + # You may pin to the exact commit or the version. + # uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83 + uses: jakejarvis/s3-sync-action@v0.5.1 + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: 'mvclabs-prod-docs-origin' + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: 'ap-northeast-1' # optional: defaults to us-east-1 + SOURCE_DIR: "build" + + # Invalidate Cloudfront (this action) + - name: CloudFront Invalidation + uses: chetan/invalidate-cloudfront-action@master + env: + DISTRIBUTION: E3T2CDKEZ09OZI + PATHS: '/' + AWS_REGION: 'us-east-1' + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + diff --git a/docs/intro.md b/docs/intro.md new file mode 100644 index 0000000..e69de29