diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe4947adb..a1ede21d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,9 @@ jobs: build: name: Build documentation runs-on: ubuntu-latest - container: ghcr.io/huangfusl/blog-env:${{ inputs.build-type }} + container: + image: ghcr.io/huangfusl/blog-env:${{ inputs.build-type }} + options: --user root steps: - name: Checkout Main @@ -23,6 +25,8 @@ jobs: with: fetch-depth: 0 submodules: 'true' + path: '.' + ref: 'main' - name: Test if: inputs.deploy == false @@ -44,8 +48,10 @@ jobs: - name: Set up Deploy Environment if: inputs.deploy run: | - git config --local user.name "github-actions[bot]" - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + cd $GITHUB_WORKSPACE + ls -al + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Deploy if: inputs.deploy @@ -54,5 +60,5 @@ jobs: run: | chown -R root:root $PWD . /root/venv/bin/activate - git pull + git checkout main && git pull python3 ./ci/deploy.py diff --git a/Dockerfile b/Dockerfile index 7747c7902..93e938c52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,3 +22,6 @@ COPY ./requirements.txt /tmp/requirements.txt RUN python3 -m venv /root/venv \ && . /root/venv/bin/activate \ && pip3 install -r /tmp/requirements.txt --no-cache-dir + +# Override the entrypoint defined in the base image +WORKDIR / \ No newline at end of file