Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start publishing site image to GHCR #3568

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,52 @@ jobs:
event-name: helm-release
labels: helmRepo=pipecd
data: ${{ env.PIPECD_VERSION }}

site:
name: Site Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV

- name: Setup Hugo
uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 #v2.5.0
with:
hugo-version: '0.92.1'
extended: true

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '14'

# Build site.
- name: Build site
run: |
cd docs
npm install autoprefixer
npm install postcss-cli
env HUGO_ENV="production" RELEASE="$(cut -c10- ../release/RELEASE)" hugo

# Login to push container images.
- name: Log in to the container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Building and pushing container images.
- name: Build and push site image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
push: true
context: docs
file: docs/Dockerfile
tags: ${{ env.REGISTRY }}/pipe-cd/site:${{ env.PIPECD_VERSION }}