Skip to content

Commit

Permalink
Deploy to the new preview server
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 9, 2024
1 parent 4ef2467 commit 93c2a17
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/deploy-documentation-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,26 @@ jobs:

- name: Compile the static site
run: php hyde build

- name: Package the static site
run: zip -r site.zip _site

- name: Sign the artifact
run: openssl dgst -sha256 -sign ${{ secrets.CI_PREVIEW_SIGNING_RSA_PRIVATE_KEY }} -out signature.bin site.zip

- name: Upload the artifact
run: |
repository="develop"
bearerToken="${{ secrets.CI_SERVER_TOKEN }}"
pullRequest="${{ github.event.pull_request.number }}"
signature=$(openssl base64 -in signature.bin)
artifact="site.zip"
curl -X POST \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer $bearerToken" \
-F 'repository=$repository \
-F 'pullRequest=$pullRequest' \
-F 'artifact=@$artifact' \
-F 'signature=$signature' \
https://ci.hydephp.com/api/deployment-previews

0 comments on commit 93c2a17

Please sign in to comment.