Skip to content

Make the apworlds page logged in restricted #98

Make the apworlds page logged in restricted

Make the apworlds page logged in restricted #98

Workflow file for this run

on: [push]
name: CI
jobs:
build:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --release
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: ap-lobby
path: target/release/ap-lobby
deploy:
environment: ${{ github.ref == 'refs/heads/prod' && 'production' || 'staging' }}
name: Deploy
runs-on: ubuntu-latest
needs: build
if:
contains('
refs/heads/main
refs/heads/prod
', github.ref)
steps:
- uses: actions/download-artifact@v4
with:
name: ap-lobby
path: ap-lobby
- name: Setup ssh
run: |
mkdir .ssh
chmod 700 .ssh
echo "${{ secrets.DEPLOY_KEY }}" > .ssh/id_ed25519
wc .ssh/id_ed25519
wc -l .ssh/id_ed25519
sha1sum .ssh/id_ed25519
chmod 600 .ssh/id_ed25519
- name: Copy
run: scp -o StrictHostKeyChecking=no -i .ssh/id_ed25519 ./ap-lobby/ap-lobby ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOSTNAME }}:${{ secrets.DEPLOY_PATH }}