Update README.md #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Prod | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
name: ssh/pull/build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull code from GitHub | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/${{ secrets.SSH_PUBLIC_KEY_NAME }} | |
cd ${{ secrets.DIST }} | |
git pull origin master | |
- name: Clean Install & Build | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/${{ secrets.SSH_PUBLIC_KEY_NAME }} | |
cd ${{ secrets.DIST }} | |
npm ci | |
npm run build | |
- name: Discord notification | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_USERNAME: "Github Monitoring" | |
DISCORD_AVATAR: "https://i.imgur.com/lPRYnJx.png" | |
uses: Ilshidur/action-discord@master | |
with: | |
args: 'The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed successfully on https://squadcalc.app' | |