An open API service indexing awesome lists of open source software.

https://github.com/michimani/hugo-pipeline

This is a AWS CDK project that create building pipeline of HUGO site.
https://github.com/michimani/hugo-pipeline

Last synced: 3 months ago
JSON representation

This is a AWS CDK project that create building pipeline of HUGO site.

Awesome Lists containing this project

README

        

hugo-pipeline
===

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

# Usase

0. prepare

```console
$ npm install
$ cdk bootstrap
```

1. create config file

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

Set environment variables in the following yaml format.

```yaml
common:
hugo_version: 0.62.0
region: #eg: ap-northeast-1

route53:
zone_name: #eg: example.com
zone_id: #eg: ABCD123467890
subdomain_host: #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.

2. test

```
$ npm run test
```

3. build

```console
$ cdk synth
```

4. deploy

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

Run AWS CLI command like following.

```
$ aws codecommit get-repository --repository-name --region
```

5. add remote repository URL

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

6. check

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