mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-12-04 12:46:10 +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:
|
on:
|
||||||
push: {}
|
push:
|
||||||
pull_request: {}
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -22,7 +26,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
- name: Set up SSH
|
- 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: |
|
run: |
|
||||||
mkdir ~/.ssh
|
mkdir ~/.ssh
|
||||||
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub
|
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub
|
||||||
@ -30,12 +34,12 @@ jobs:
|
|||||||
chmod 600 ~/.ssh/*
|
chmod 600 ~/.ssh/*
|
||||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
- name: Deploy build on server
|
- 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: |
|
run: |
|
||||||
rsync --del --no-times --checksum -vrm dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.DESTINATION_DIR }}
|
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"
|
ssh -t ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "~/prmanifest --inpath ${{ secrets.DESTINATION_DIR }} --outpath ${{ secrets.DESTINATION_DIR }}/manifest.json"
|
||||||
- name: Purge Cloudflare Cache
|
- 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
|
id: purge-cache
|
||||||
uses: NathanVaughn/actions-cloudflare-purge@v3.1.0
|
uses: NathanVaughn/actions-cloudflare-purge@v3.1.0
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user