Skip to content

update deploy

update deploy #182

Workflow file for this run

on:
push:
branches:
- master
env:
NODE_VERSION: "10.x"
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Clean up
run: |
rm -rf styles/main.css
- name: Install
run: |
npm i -g bower
npm install
bower install
- name: Build
run: |
npm run build
- uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: sites-frontend
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "eu-central-1"
SOURCE_DIR: "docs"
DEST_DIR: "old-rs-school"
# - name: Invalidate
# run: |
# aws cloudfront create-invalidation --distribution-id E13GQ210A1DMQY --paths "/*"
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: "eu-central-1"