-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,9 @@ jobs: | |
|
||
env: | ||
dir: 'packages/examples/${{ matrix.dir }}/' | ||
domain: '${{ matrix.dir }}.${{ vars.DOMAIN }}' | ||
archive: 'site.tar.gz' | ||
storage_name_key: 'STORAGE_NAME_${{ matrix.dir }}' | ||
storage_password_key: 'STORAGE_PASSWORD_${{ matrix.dir }}' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
@@ -43,7 +44,7 @@ jobs: | |
# 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 }}" | ||
|
||
# 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" | ||
|
@@ -52,16 +53,14 @@ jobs: | |
uses: ./.github/workflows/repo/build-page | ||
with: | ||
root: ${{ env.dir }} | ||
archive: ${{ env.archive }} | ||
|
||
- name: Prepare SSH | ||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | ||
- name: BunnyCDN storage deployer | ||
uses: ayeressian/[email protected] | ||
with: | ||
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.domain }}@${{ secrets.SSH_HOST }}" | ||
ssh "${{ env.domain }}@${{ secrets.SSH_HOST }}" "tar -xf ${{ env.archive }}" | ||
source: '${{ env.dir }}.dist/prod' | ||
destination: '' | ||
storageZoneName: '${{ secrets[env.storage_name_key] }}' | ||
storagePassword: '${{ secrets[env.storage_password_key] }}' | ||
upload: 'true' | ||
remove: 'false' | ||
purgePullZone: 'false' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ jobs: | |
|
||
env: | ||
dir: 'packages/nuejs.org/' | ||
domain: '${{ vars.DOMAIN }}' | ||
archive: 'site.tar.gz' | ||
|
||
runs-on: ubuntu-latest | ||
|
@@ -29,16 +28,14 @@ jobs: | |
uses: ./.github/workflows/repo/build-page | ||
with: | ||
root: ${{ env.dir }} | ||
archive: ${{ env.archive }} | ||
|
||
- name: Prepare SSH | ||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | ||
- name: BunnyCDN storage deployer | ||
uses: ayeressian/[email protected] | ||
with: | ||
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.domain }}@${{ secrets.SSH_HOST }}" | ||
ssh "${{ env.domain }}@${{ secrets.SSH_HOST }}" "tar -xf ${{ env.archive }}" | ||
source: '${{ env.dir }}.dist/prod' | ||
destination: '' | ||
storageZoneName: '${{ secrets.STORAGE_NAME_site }}' | ||
storagePassword: '${{ secrets.STORAGE_PASSWORD_site }}' | ||
upload: 'true' | ||
remove: 'false' | ||
purgePullZone: 'false' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters