1
0
mirror of https://github.com/PrivSec-dev/privsec.dev synced 2024-12-23 05:11:34 -05:00

Workflow fixes

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2022-07-21 02:23:47 -04:00
parent 52bff6c11f
commit 3ebd12fcb6
No known key found for this signature in database
GPG Key ID: 060B29EB996BD9F2
2 changed files with 9 additions and 6 deletions

View File

@ -39,11 +39,19 @@ jobs:
- name: Remove artifact zip
run: rm hugo.zip
#Extracting and deployment workflow copied from https://github.com/gpuweb/gpuweb/blob/main/.github/workflows/preview-pull-request.yml
- name: Find PR
if: ${{ github.event.workflow_run.event == 'pull_request' }}
run: |
PR=$(curl https://api.github.com/search/issues?q=${{ github.event.workflow_run.head_sha }} |
grep -Po "(?<=${{ github.event.workflow_run.repository.full_name }}\/pulls\/)\d*" | head -1)
echo "PR=$PR" >> $GITHUB_ENV
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIVSEC_356523 }}'
projectId: privsec-356523
channelID: '$(cat .PR)'
channelId: prs-${{ env.PR }}-${{ github.event.workflow_run.head_sha }}
expires: 30d

View File

@ -23,11 +23,6 @@ jobs:
- name: Build Hugo site
run: hugo --minify
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > .PR
- name: Upload artifact
uses: actions/upload-artifact@v2