Merge pull request #19 from maormagori/feat/add-manual-dispatch #18
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 addon to beamup | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
jobs: | |
verify-version: | |
name: Check package version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check package version | |
uses: technote-space/package-version-check-action@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
beamup-deploy: | |
needs: verify-version | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install beamup | |
run: npm install beamup-cli -g | |
- name: Create beamup json | |
env: | |
BEAMUP_CONFIG_JSON: ${{ secrets.BEAMUP_CONFIG_JSON }} | |
run: | | |
touch ~/beamup-config.json | |
echo "$BEAMUP_CONFIG_JSON" > ~/beamup-config.json | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Add beamup remote | |
run: | | |
mkdir ~/.ssh/ | |
touch ~/.ssh/known_hosts | |
ssh-keyscan -H a.baby-beamup.club >> ~/.ssh/known_hosts | |
git remote add beamup ${{ secrets.BEAMUP_REMOTE }} | |
- name: Add private key | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
touch ~/.ssh/id_rsa | |
echo "$SSH_KEY" > ~/.ssh/id_rsa | |
chmod 400 ~/.ssh/id_rsa | |
- name: Deploy addon to beamup | |
run: git push beamup HEAD:master --force | |