Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Dec 14, 2024
1 parent bf2c5fe commit 13683d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/push-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

env:
dir: 'packages/examples/${{ matrix.dir }}/'
host: '${{ matrix.dir }}.nuejs.org'
domain: '${{ matrix.dir }}.${{ vars.DOMAIN }}'
archive: 'site.tar.gz'

runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,11 +57,11 @@ jobs:
- name: Prepare SSH
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-host: ${{ secrets.SSH_HOST }}

# 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 ${{ env.archive }}"
scp "${{ env.archive }}" "${{ env.domain }}@${{ secrets.SSH_HOST }}"
ssh "${{ env.domain }}@${{ secrets.SSH_HOST }}" "tar -xf ${{ env.archive }}"
8 changes: 4 additions & 4 deletions .github/workflows/push-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

env:
dir: 'packages/nuejs.org/'
host: 'nuejs.org'
domain: '${{ vars.DOMAIN }}'
archive: 'site.tar.gz'

runs-on: ubuntu-latest
Expand All @@ -34,11 +34,11 @@ jobs:
- name: Prepare SSH
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-host: ${{ secrets.SSH_HOST }}

# 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 ${{ env.archive }}"
scp "${{ env.archive }}" "${{ env.domain }}@${{ secrets.SSH_HOST }}"
ssh "${{ env.domain }}@${{ secrets.SSH_HOST }}" "tar -xf ${{ env.archive }}"

0 comments on commit 13683d9

Please sign in to comment.