Skip to content

Bump follow-redirects from 1.15.4 to 1.15.6 #195

Bump follow-redirects from 1.15.4 to 1.15.6

Bump follow-redirects from 1.15.4 to 1.15.6 #195

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Setup
run: |
npm install -g @angular/cli
npm ci
env:
CI: true
- name: Build for staging
if: github.ref == 'refs/heads/staging'
run: ng build --configuration=staging
- name: Configure AWS credentials for staging
if: github.ref == 'refs/heads/staging'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to staging
if: github.ref == 'refs/heads/staging'
run: |
aws s3 sync dist/ s3://events.worldskills.show --exclude index.html --cache-control max-age=31536000
aws s3 cp dist/index.html s3://events.worldskills.show/index.html --metadata-directive REPLACE --cache-control max-age=60
- name: Invalidate staging
if: github.ref == 'refs/heads/staging'
run: aws cloudfront create-invalidation --distribution-id E3VOFUYQ7T40H8 --paths /index.html /assets/i18n/*
- name: Build for production
if: github.ref == 'refs/heads/prod'
run: ng build --configuration=prod
- name: Configure AWS credentials for production
if: github.ref == 'refs/heads/prod'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to production
if: github.ref == 'refs/heads/prod'
run: |
aws s3 sync dist/ s3://events.worldskills.org --exclude index.html --cache-control max-age=31536000
aws s3 cp dist/index.html s3://events.worldskills.org/index.html --metadata-directive REPLACE --cache-control max-age=60
- name: Invalidate production
if: github.ref == 'refs/heads/prod'
run: aws cloudfront create-invalidation --distribution-id EW0W81GM2S4NZ --paths /index.html /assets/i18n/*