Coder Social home page Coder Social logo

annoyedplatypus / hugo-s3-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plopcas/hugo-s3-action

0.0 0.0 0.0 11 KB

GitHub Action to use `hugo deploy` configured with an S3 target

License: MIT License

Dockerfile 9.06% Shell 90.94%

hugo-s3-action's Introduction

Hugo S3 Action

GitHub action to run hugo deploy provided there is an S3 target configured in your Hugo repo.

Usage

name: Hugo S3

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    
    runs-on: ubuntu-latest

    steps:
      - name: Check out master
        uses: actions/checkout@master
          
      - name: Deploy site
        uses: plopcas/[email protected]
        env:
          AWS_REGION: 'eu-west-2'
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          MINIFY: 'true'

Configuration

Set the following properties as secrets in your repository under Settings / Secrets.

Name Required Description
AWS_REGION Yes AWS region
AWS_ACCESS_KEY_ID Yes Access key with permissions to execute your deployment
AWS_SECRET_ACCESS_KEY Yes Secret key
MINIFY No Applies asset minification

Information about how to configure a deployment to S3 in Hugo can be found here https://gohugo.io/hosting-and-deployment/hugo-deploy/.

You can optionally include a CloudFront distribution ID in your config.toml file. Make sure the key you use can grant permission to invalidate it as well as deploy to S3 in that case.

License

This project is distributed under the MIT license.

hugo-s3-action's People

Contributors

plopcas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.