Skip to content

Merge pull request #104 from scpwiki/minify-fix #64

Merge pull request #104 from scpwiki/minify-fix

Merge pull request #104 from scpwiki/minify-fix #64

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
env:
BUCKET_PATH: theme/en/sigma
jobs:
build-and-deploy:
name: Deploy CSS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install dependencies
run: npm ci
- name: Build
run: ./build.sh
- name: Deploy (GitHub Pages)
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
- name: Deploy (S3)
uses: emmiegit/s3-sync-action@main
with:
args: --delete
env:
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }}
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: dist
DEST_DIR: ${{ env.BUCKET_PATH }}
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.CF_DISTRIBUTION }}
PATHS: /${{ env.BUCKET_PATH }}/ /${{ env.BUCKET_PATH }}/*
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}