Skip to content

remove: githubaction workflow uses cache #6

remove: githubaction workflow uses cache

remove: githubaction workflow uses cache #6

Workflow file for this run

name: S3 deploy with cloud front
on:
push:
branches:
- githubaction
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
steps:
- name: Checkout source code.
uses: actions/checkout@v1
# - name: Cache node_modules
# id: cache
# uses: actions/cache@v5
# with:
# path: '**/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.OS }}-build-
# ${{ runner.OS }}-
- name: Install dependencies
run: npm install
# if: steps.cache.outputs.cache-hit != 'true'
- name: Build
run: npm run build
- name: Deploy
uses: lbertenasco/s3-deploy@v1
with:
folder: build
bucket: ${{ secrets.S3_BUCKET }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: / *