mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-12-03 12:16:22 +00:00
Change deploy script to specify "main" instead of default_branch
(#4557)
This commit is contained in:
parent
c2c41d9be8
commit
f9691b872b
16
.github/workflows/deploy.yml
vendored
16
.github/workflows/deploy.yml
vendored
@ -1,8 +1,12 @@
|
||||
name: Deploy
|
||||
name: Deploy Main
|
||||
|
||||
on:
|
||||
push: {}
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -22,7 +26,7 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
- name: Set up SSH
|
||||
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
|
||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||
run: |
|
||||
mkdir ~/.ssh
|
||||
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub
|
||||
@ -30,12 +34,12 @@ jobs:
|
||||
chmod 600 ~/.ssh/*
|
||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||
- name: Deploy build on server
|
||||
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
|
||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||
run: |
|
||||
rsync --del --no-times --checksum -vrm dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DESTINATION_DIR }}
|
||||
ssh -t ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "~/prmanifest --inpath ${{ secrets.DESTINATION_DIR }} --outpath ${{ secrets.DESTINATION_DIR }}/manifest.json"
|
||||
- name: Purge Cloudflare Cache
|
||||
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
|
||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||
id: purge-cache
|
||||
uses: NathanVaughn/actions-cloudflare-purge@v3.1.0
|
||||
with:
|
||||
|
Loading…
Reference in New Issue
Block a user