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:
parent
52bff6c11f
commit
3ebd12fcb6
@ -39,11 +39,19 @@ jobs:
|
|||||||
- name: Remove artifact zip
|
- name: Remove artifact zip
|
||||||
run: rm hugo.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
|
- name: Deploy to Firebase
|
||||||
uses: FirebaseExtended/action-hosting-deploy@v0
|
uses: FirebaseExtended/action-hosting-deploy@v0
|
||||||
with:
|
with:
|
||||||
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIVSEC_356523 }}'
|
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIVSEC_356523 }}'
|
||||||
projectId: privsec-356523
|
projectId: privsec-356523
|
||||||
channelID: '$(cat .PR)'
|
channelId: prs-${{ env.PR }}-${{ github.event.workflow_run.head_sha }}
|
||||||
expires: 30d
|
expires: 30d
|
5
.github/workflows/pull-request-receiver.yml
vendored
5
.github/workflows/pull-request-receiver.yml
vendored
@ -23,11 +23,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Hugo site
|
- name: Build Hugo site
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Save PR number
|
|
||||||
run: |
|
|
||||||
mkdir -p ./pr
|
|
||||||
echo ${{ github.event.number }} > .PR
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
Loading…
Reference in New Issue
Block a user