Skip to content

Commit

Permalink
#26 Record docker image used to build static site in a Docker image r…
Browse files Browse the repository at this point in the history
…egistry; #25 Add basic GitHub actions to build and run tests
  • Loading branch information
asset-web committed Mar 20, 2024
1 parent d6bc5a8 commit 7c0eacb
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://paypal.me/tessaalexander"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and test static site

on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:

env:
TEST_TAG: assetweb/tvl-jekyll:test
LATEST_TAG: assetweb/tvl-jekyll:latest

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Test
run: |
docker run --rm ${{ env.TEST_TAG }}
- name: Build and push
uses: docker/build-push-action@v5
if: ${{ ! startsWith(github.ref, 'refs/heads/master') }}
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.LATEST_TAG }}
- name: Archive static files
uses: actions/upload-artifact@v4
if: ${{ ! startsWith(github.ref, 'refs/heads/master') }}
with:
name: jekyll-static-output
path: _site
retention-days: 90
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# CHANGELOG
# CHANGE LOG

## [1.3.0] 2024-03-20

### Added
- #26 Record docker image used to build static site in a Docker image registry
- #25 Add basic GitHub actions to build and run tests

## [1.2.1] 2020-08-13

### Security
- #10 Update dependencies, including kramdown.

## [1.2.0] 2020-08-08

## [1.1.0] 2020-02-22

### Security
- Update third party dependencies including nokogiri.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
gem install bundler


### OS X set up
### Bare OS X set up

Prerequisite homebrew is installed

Expand Down Expand Up @@ -58,6 +58,16 @@ Prerequisite homebrew is installed
bundle update jekyll
bundle update

### Docker set up

Build static site and run tests locally

```
docker build . -t tvl-web
docker run --rm tvl-web
```


## CI/CD

Gitflow workflow in use. Travis CI used to build and test. Deploy static Jekyll site to remote server is managed using Digital Ocean integration.

0 comments on commit 7c0eacb

Please sign in to comment.