changelog #208
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 pre-prod | |
on: | |
push: | |
branches: [ dev ] | |
jobs: | |
build: | |
name: ssh/pull/build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Extract the version from package.json | |
- name: Get version from package.json | |
id: get_version | |
run: | | |
VERSION=$(jq -r '.version' package.json) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Pull code & Build | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
port: ${{ secrets.PORT }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
script: | | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/${{ secrets.SSH_PUBLIC_KEY_NAME }} | |
cd ${{ secrets.DEV_DIST }} | |
git pull origin dev | |
npm ci | |
npm run build | |
- name: Discord notification | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_BETA }} | |
DISCORD_USERNAME: "Github Monitoring" | |
DISCORD_AVATAR: "https://i.imgur.com/lPRYnJx.png" | |
uses: Ilshidur/action-discord@master | |
with: | |
args: | | |
**${{ github.repository }}** has been deployed on beta.squadcalc.app | |
**Commit**: ${{ github.event.head_commit.message }} |