Skip to content
This is a AWS CDK project that create building pipeline of HUGO site.
TypeScript JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
test
.gitignore
.npmignore
README.md
buildspec_base.yml
cdk.context.json
cdk.json
jest.config.js
package-lock.json
package.json
stack-config.yml.sample
tsconfig.json

README.md

hugo-pipeline

This is a sample project for TypeScript development with CDK.
You can create build pipeline of HUGO site using this project.

Usase

  1. prepare

    $ npm install
    $ cdk bootstrap
  2. create config file

    $ cp stack-config.yml.sample stack-config.yml

    Set environment variables in the following yaml format.

    common:
      hugo_version: 0.62.0
      region: <deploy-target-region> #eg: ap-northeast-1
    
    route53:
      zone_name: <existed-hosted-zone-name> #eg: example.com
      zone_id: <existed-hosted-zone-id> #eg: ABCD123467890
      subdomain_host: <hostname-of-sub-domain (optional)> #eg: hugo (if you want to host this site as "hugo.example.com")
    
    codepipeline:
      branch: master

    You can check the values ​​of route53.zone and route53.zone_id in the Route 53 management console.

  3. test

    $ npm run test
    
  4. build

    $ cdk synth
  5. deploy

    $ cdk deploy && cat ./cdk.out/codecommit_info.txt

    Run AWS CLI command like following.

    $ aws codecommit get-repository --repository-name <generated codecommit repo name> --region <specified region>
    
  6. add remote repository URL

    Add SSH or HTTP repository URL to your HUGO project. (git remote add)

  7. check

    Access the domain you set up (rg: hugo.example.com), and check if the web page is displayed correctly.

You can’t perform that action at this time.