Skip to content

Docs V1: Add plugin tutorial Chapter 2 - Setup, plugin types, and pro… #2505

Docs V1: Add plugin tutorial Chapter 2 - Setup, plugin types, and pro…

Docs V1: Add plugin tutorial Chapter 2 - Setup, plugin types, and pro… #2505

Workflow file for this run

name: publish_site
on:
push:
branches:
- master
tags:
- 'v*'
env:
GHCR: ghcr.io
HELM_VERSION: 3.8.2
jobs:
site:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7 --match 'v[0-9]*.*')" >> $GITHUB_ENV
- name: Setup Hugo
uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 #v3.2.1
with:
hugo-version: '0.148.2'
extended: true
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: '24.10.0'
# Build site.
- name: Build site
run: |
cd docs
npm ci
env HUGO_ENV="production" RELEASE="$(grep '^tag:' ../RELEASE | awk '{print $2}')" hugo
# Building and pushing container images.
- name: Log in to the container registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.GHCR }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push site image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a #v7.3.0
with:
push: true
context: docs
file: docs/Dockerfile
tags: ${{ env.GHCR }}/pipe-cd/site:${{ env.PIPECD_VERSION }}
# parameter to use inline cache. ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache
cache-from: type=registry,ref=${{ env.GHCR }}/pipe-cd/site:latest
cache-to: type=inline
# Building and pushing Helm charts.
- name: Install helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: ${{ env.HELM_VERSION }}
- name: Login to OCI using Helm
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.GHCR }} --username ${{ github.repository_owner }} --password-stdin
- name: Publish site chart
run: |
make build/chart MOD=site VERSION=${{ env.PIPECD_VERSION }}
helm push .artifacts/site-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart