Skip to content

Commit

Permalink
only archive when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Nov 30, 2024
1 parent e33d83c commit 9bf2574
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/push-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
uses: ./.github/workflows/repo/build-page
with:
root: ${{ env.dir }}
archive: site.tar.gz

- name: Prepare SSH
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: ./.github/workflows/repo/build-page
with:
root: ${{ env.dir }}
archive: site.tar.gz

- name: Prepare SSH
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/repo/build-page/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
root:
default: '.'
type: string
archive:
default: ''
type: string

runs:
using: composite
Expand All @@ -22,7 +25,8 @@ runs:
run: nue build -pr "${{ inputs.root }}"

- name: Archive files
if: ${{ inputs.archive }}
shell: bash
run: |
cd "${{ inputs.root }}.dist/prod"
tar -czf site.tar.gz .
tar -czf ${{ inputs.archive }} .

0 comments on commit 9bf2574

Please sign in to comment.