Skip to content

Commit

Permalink
Start publishing site image to GHCR (#3568)
Browse files Browse the repository at this point in the history
  • Loading branch information
nghialv authored Apr 22, 2022
1 parent ecb3ce7 commit 3bf235f
Showing 1 changed file with 49 additions and 0 deletions.
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 }}

0 comments on commit 3bf235f

Please sign in to comment.