Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Dec 6, 2024
1 parent 18b26a5 commit d4cc954
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/push-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ jobs:

# creates archive of dir, removes img dirs, moves content to subdir "source"
- name: Create test archive
run: tar -C "${{ env.dir }}" --exclude "*/img" --transform "s/^\./source/" -cf "${{ env.dir }}test.tar.gz" .
run: tar -C "${{ env.dir }}" --exclude "*/img" --transform "s/^\.\//source\//" -cf "${{ env.dir }}test.tar.gz" .
if: ${{ matrix.dir == 'simple-blog' }}

# creates archive of dir, moves content to subdir "source"
- name: Create source archive
run: git archive --prefix "source/" -o "${{ env.dir }}source.tar.gz" HEAD:${{ env.dir }}
run: git archive --prefix "source/" -o "${{ env.dir }}source.tar.gz" "HEAD:${{ env.dir }}"

# Copy source archive, to allow old source path on web server. Step should get removed after new release and a bit of time
- name: Duplicate source archive
run: cp "${{ env.dir }}source.tar.gz" "${{ env.dir }}${{ matrix.dir }}.tar.gz"

- name: Nue build
uses: ./.github/workflows/repo/build-page
Expand All @@ -59,5 +63,5 @@ jobs:
# copies built site archive to server, unpacks archive on server
- name: Push files to web server
run: |
scp "${{ env.archive }}" ${{ env.host }}@${{ secrets.SSH_HOST }}
ssh ${{ env.host }}@${{ secrets.SSH_HOST }} "tar -xf site.tar.gz"
scp "${{ env.archive }}" "${{ env.host }}@${{ secrets.SSH_HOST }}"
ssh "${{ env.host }}@${{ secrets.SSH_HOST }}" "tar -xf site.tar.gz"
4 changes: 2 additions & 2 deletions .github/workflows/push-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ jobs:
# copies built site archive to server, unpacks archive on server
- name: Push files to web server
run: |
scp "${{ env.archive }}" ${{ env.host }}@${{ secrets.SSH_HOST }}
ssh ${{ env.host }}@${{ secrets.SSH_HOST }} "tar -xf site.tar.gz"
scp "${{ env.archive }}" "${{ env.host }}@${{ secrets.SSH_HOST }}"
ssh "${{ env.host }}@${{ secrets.SSH_HOST }}" "tar -xf site.tar.gz"

0 comments on commit d4cc954

Please sign in to comment.