Merge pull request #330 from melpon/develop #31
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 | |
workflow_dispatch: | |
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: Deploy feline to wandbox.org | |
run: | | |
python3 run.py package feline --env master | |
python3 run.py deploy wandbox-ubuntu-24.04 feline --env master | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '22' | |
- 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 |