Skip to content

Commit

Permalink
chore: Update Dockerfile to use GitHub Container Registry for image b…
Browse files Browse the repository at this point in the history
…uild and push
  • Loading branch information
Anduin2017 committed Jun 3, 2024
1 parent 9ca4c5f commit 9172f2f
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,27 @@ jobs:
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Build docs
- run: echo cook.aiurs.co > CNAME
- run: mkdir docs && echo cook.aiurs.co > docs/CNAME
- uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: cook.aiurs.co
CONFIG_FILE: mkdocs.yml
REQUIREMENTS: requirements.txt

# Deprecated. Now use docker.
# - run: echo cook.aiurs.co > CNAME
# - run: mkdir docs && echo cook.aiurs.co > docs/CNAME
# - uses: mhausenblas/mkdocs-deploy-gh-pages@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CUSTOM_DOMAIN: cook.aiurs.co
# CONFIG_FILE: mkdocs.yml
# REQUIREMENTS: requirements.txt

# Use docker to build current directory ./Dockfile
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the hello-world Docker image
run: |
docker build . --tag ghcr.io/anduin2017/how-to-cook:latest
docker run ghcr.io/anduin2017/how-to-cook:latest
docker push ghcr.io/anduin2017/how-to-cook:latest

0 comments on commit 9172f2f

Please sign in to comment.