Skip to content

Commit

Permalink
Exclude example files from the Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
kadykov committed Nov 20, 2024
1 parent 1d776b5 commit 4198034
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ env:
IMAGE_TAG: ${{ vars.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPOSITORY }}:${{ github.ref_name }}
IMAGE_TAG_TESTING: ${{ vars.DOCKERHUB_USERNAME }}/${{ vars.DOCKERHUB_REPOSITORY }}:testing
OUTPUT_DIR: public
ARTIFACTS_NAME: pdf
OUTPUT_ARTIFACTS_NAME: pdf
SOURCE_ARTIFACTS_NAME: source

jobs:
pre_commit:
Expand Down Expand Up @@ -49,22 +50,37 @@ jobs:
cache-from: type=registry,ref=${{ env.IMAGE_TAG_TESTING }}
cache-to: type=inline

- name: Upload source files
uses: actions/upload-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACTS_NAME }}
path: |
./kadykov-*.md
./photo.jpg
./justfile
if-no-files-found: error

render:
name: Render default files and update Docker tags
needs: docker
runs-on: ubuntu-latest
steps:
- name: Download source files
uses: actions/download-artifact@v4
with:
name: ${{ env.SOURCE_ARTIFACTS_NAME }}

- name: Render with testing Docker image
run: >
docker container run
-v "${PWD}:/data/public"
-v "${PWD}:/data"
--user "$(id -u):$(id -g)"
${{ env.IMAGE_TAG_TESTING }}
- name: Upload rendered PDFs
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACTS_NAME }}
name: ${{ env.OUTPUT_ARTIFACTS_NAME }}
path: ./*.pdf
if-no-files-found: error

Expand Down Expand Up @@ -93,7 +109,7 @@ jobs:
- name: Download rendered PDFs
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACTS_NAME }}
name: ${{ env.OUTPUT_ARTIFACTS_NAME }}
path: ${{ env.OUTPUT_DIR }}/

- name: Add HTML for GitHub Pages
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ ENV TYPST_PACKAGE_PATH=/usr/local/share/typst/packages/
COPY style.typ typst.toml ${TYPST_PACKAGE_PATH}/local/pandoc-cv/${PANDOC_CV_VERSION}/

WORKDIR /data
COPY justfile kadykov-*.md /data/

ENTRYPOINT [ "just", "build" ]

0 comments on commit 4198034

Please sign in to comment.