-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.49 KB
/
beamup-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: 20.9.0
- 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