Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Nov 22, 2023
1 parent 25c0462 commit 1471582
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
tags: ghcr.io/hbstack/site:latest,ghcr.io/hbstack/site:${{ github.sha }}
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
NETRC_USERNAME=${{ secrets.NETRC_GITHUB_USERNAME }}
NETRC_PASSWORD=${{ secrets.NETRC_GITHUB_PASSWORD }}
- uses: azure/setup-kubectl@v3
id: install
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/cloudflare-page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: extractions/netrc@v1
with:
machine: github.com
username: ${{ secrets.NETRC_GITHUB_USERNAME }}
password: ${{ secrets.NETRC_GITHUB_PASSWORD }}
- run: echo "machine github.com\nlogin ${{ secrets.NETRC_GITHUB_USERNAME }}\npassword ${{ secrets.NETRC_GITHUB_PASSWORD }}" > ~/.netrc

# - name: Cache dependencies
# uses: actions/cache@v3
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
FROM hugomods/hugo:exts as builder
ARG GITHUB_TOKEN
ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ARG NETRC_USERNAME
ENV NETRC_USERNAME=${NETRC_USERNAME}
ARG NETRC_PASSWORD
ENV NETRC_USERNAME=${NETRC_PASSWORD}
# Base URL
ARG HUGO_BASEURL=
ENV HUGO_BASEURL=${HUGO_BASEURL}
Expand All @@ -12,6 +16,7 @@ ARG HUGO_MODULE_PROXY=
ENV HUGO_MODULE_PROXY=${HUGO_MODULE_PROXY}
# Build site
COPY . /src
RUN echo "machine github.com\nlogin $NETRC_USERNAME\npassword $NETRC_PASSWORD" > ~/.netrc
RUN hugo --minify --gc --enableGitInfo

###############
Expand Down

0 comments on commit 1471582

Please sign in to comment.