Skip to content

Commit

Permalink
fix 自動デプロイの削除
Browse files Browse the repository at this point in the history
  • Loading branch information
H37kouya committed Dec 27, 2024
1 parent e837a37 commit f79072d
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,54 +62,3 @@ jobs:
run: |
docker compose exec -T app ls storage/logs
docker compose exec -T app /bin/bash -c "cd storage/logs && find . -type f | xargs cat"
deploy-stg:
if: github.ref == 'refs/heads/develop/stg'
needs: [laravel-tests]
runs-on: ubuntu-latest

steps:
- name: Deploy
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.XSERVER_HOST_NAME }}
username: ${{ secrets.XSERVER_USER_NAME }}
key: ${{ secrets.XSERVER_SSH_KEY }}
port: 10022
script: |
whoami
pwd
ls -la
deploy:
if: github.ref == 'refs/heads/develop/production'
needs: [laravel-tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Deploy
env:
PRIVATE_KEY: ${{ secrets.XSERVER_SSH_KEY }}
USER_NAME: ${{ secrets.XSERVER_USER_NAME }}
HOST_NAME: ${{ secrets.XSERVER_HOST_NAME }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -vvv -p 10022 -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOST_NAME} '
cd ~/uu-circles.com/work/api && \
mkdir ${{ github.run_number }} && \
cd ${{ github.run_number }} && \
git clone https://github.com/UU-PlatHome/uu-circles.git && \
cd uu-circles/api && \
git reset --hard origin/develop/production && \
cp ../../../.env .env && \
cp ../../../credentials.json credentials.json && \
composer install && \
php artisan migrate --force && \
php artisan cache:clear && \
php artisan config:cache && \
php artisan route:cache && \
php artisan view:cache
cd ~/uu-circles.com && \
ln -nfs ~/uu-circles.com/work/api/${{ github.run_number }} ~/uu-circles.com/work/api/current
'

0 comments on commit f79072d

Please sign in to comment.