Merge branch 'develop' #28
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 wandbox.org | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Register SSH key | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
mkdir -p $HOME/.ssh | |
echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/id_ed25519 | |
chmod 600 $HOME/.ssh/id_ed25519 | |
- name: Add SSH config | |
env: | |
SSH_HOST: ${{ secrets.SSH_HOST_UBUNTU_24_04 }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
run: | | |
set -ex | |
echo "Host wandbox-ubuntu-24.04" >> $HOME/.ssh/config | |
echo " HostName $SSH_HOST" >> $HOME/.ssh/config | |
echo " User $SSH_USER" >> $HOME/.ssh/config | |
echo " ServerAliveInterval 60" >> $HOME/.ssh/config | |
echo " TCPKeepAlive yes" >> $HOME/.ssh/config | |
ssh-keyscan -H $SSH_HOST >> $HOME/.ssh/known_hosts | |
- name: apt install | |
run: sudo apt-get install -y libcap-dev | |
- name: Get cached tools | |
id: cache-tools | |
uses: actions/cache@v4 | |
with: | |
path: _install | |
key: install-deps-v3 | |
- name: Package cattleshed | |
run: python3 run.py package --env master cattleshed | |
- name: Package kennel | |
run: python3 run.py package --env master kennel | |
- name: Deploy cattleshed to wandbox.org | |
run: | | |
python3 run.py deploy wandbox-ubuntu-24.04 cattleshed --env master | |
- name: Deploy kennel to wandbox.org | |
run: | | |
python3 run.py deploy wandbox-ubuntu-24.04 kennel --env master | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules-v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('canine/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build Workers | |
working-directory: canine | |
run: | | |
set -ex | |
npm install | |
npm run build | |
# - name: Publish canine | |
# working-directory: canine | |
# env: | |
# CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
# run: | | |
# set -ex | |
# npm install -g @cloudflare/wrangler | |
# npm run deploy:prod |