From d6bc5a85fb8751daea6fd6fbe990d5bf4d9db2c1 Mon Sep 17 00:00:00 2001 From: Tessa Alexander Date: Wed, 20 Mar 2024 14:12:23 +0000 Subject: [PATCH 1/3] add --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 21781ef..aba98c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,4 @@ RUN bundle install COPY . /src -CMD ["bash", "/src/script/cibuild.sh"] \ No newline at end of file +CMD ["bash", "/src/scripts/cibuild.sh"] \ No newline at end of file From 7c0eacb4df008a8a24e49e39b31b3216f2c87f4e Mon Sep 17 00:00:00 2001 From: Tessa Alexander Date: Wed, 20 Mar 2024 14:47:51 +0000 Subject: [PATCH 2/3] #26 Record docker image used to build static site in a Docker image registry; #25 Add basic GitHub actions to build and run tests --- .github/FUNDING.yml | 12 +++++++++ .github/dependabot.yml | 6 +++++ .github/workflows/docker.yml | 52 ++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 10 ++++++- README.md | 12 ++++++++- 5 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/docker.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..a2b5ddf --- /dev/null +++ b/.github/FUNDING.yml @@ -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'] diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..120c689 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..3b9cbc1 --- /dev/null +++ b/.github/workflows/docker.yml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c8c74..0d84e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. \ No newline at end of file diff --git a/README.md b/README.md index 44e4f08..1f6b723 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ gem install bundler -### OS X set up +### Bare OS X set up Prerequisite homebrew is installed @@ -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. From 68fa466e0d6f7b277ce989d07ad22a5b0b8a4659 Mon Sep 17 00:00:00 2001 From: Tessa Alexander Date: Wed, 20 Mar 2024 15:14:30 +0000 Subject: [PATCH 3/3] Ensure gemfile is still covered by dependabot checks [skip ci] --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 120c689..34e63b0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,10 @@ version: 2 updates: - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "bundler" directory: "/" schedule: interval: "weekly" \ No newline at end of file