Gitea can't checkout outside from the workspace directory
This commit is contained in:
parent
5c657a60ac
commit
c762b9eb24
@ -6,10 +6,17 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [dev, docker-compose]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /root/homepage
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
config
|
||||
|
||||
- name: Copy files to target directory
|
||||
run: |
|
||||
mkdir -p /root/homepage
|
||||
cp -r * /root/homepage/
|
||||
|
||||
- name: Check dockerfile existence
|
||||
id: docker-compose-exist
|
||||
run: |
|
||||
@ -21,26 +28,26 @@ jobs:
|
||||
|
||||
- name: Status homepage stack
|
||||
if: ${{ steps.docker-compose-exist.outputs.result }}
|
||||
working-directory: /root/homepage
|
||||
run: |
|
||||
docker compose ps
|
||||
|
||||
- name: Shutdown homepage stack
|
||||
if: ${{ steps.docker-compose-exist.outputs.result }}
|
||||
working-directory: /root/homepage
|
||||
run: |
|
||||
docker compose down
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: /root/homepage
|
||||
sparse-checkout: |
|
||||
config
|
||||
|
||||
|
||||
- name: Start homepage stack
|
||||
if: ${{ steps.docker-compose-exist.outputs.result }}
|
||||
working-directory: /root/homepage
|
||||
run: |
|
||||
docker compose up
|
||||
|
||||
- name: Status homepage stack
|
||||
if: ${{ steps.docker-compose-exist.outputs.result }}
|
||||
working-directory: /root/homepage
|
||||
run: |
|
||||
docker compose ps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user