infinityfree-deploy.yml
1 name: daoko.likesyou.org 2 # Workflow to deploy the app to InfinityFree 3 # This ensures that the app is deployed to https://daoko.likesyou.org after tests pass 4 on: 5 workflow_run: 6 workflows: ["Predeploy"] 7 branches: [js] 8 types: [completed] 9 10 jobs: 11 deploy: 12 name: βΎοΈπ via FTP π 13 runs-on: ubuntu-latest 14 # Only run if the predeploy workflow was successful 15 if: ${{ github.event.workflow_run.conclusion == 'success' }} 16 environment: 17 name: infinityfree 18 url: https://daoko.likesyou.org 19 steps: 20 - name: Checkout code 21 uses: actions/checkout@v4 22 with: 23 ref: ${{ github.event.workflow_run.head_sha }} 24 - name: Create GitHub deployment 25 uses: chrnorm/deployment-action@v2 26 id: deployment 27 with: 28 token: ${{ github.token }} 29 environment: infinityfree 30 initial-status: in_progress 31 ref: ${{ github.event.workflow_run.head_sha }} 32 description: "Deploying to InfinityFree" 33 - name: FTP Deploy 34 id: ftp-deploy 35 uses: SamKirkland/FTP-Deploy-Action@v4.3.4 36 with: 37 server: ftpupload.net 38 username: if0_38674858 39 password: ${{ secrets.FTP_PASSWORD }} 40 server-dir: /daoko.likesyou.org/htdocs/ 41 - name: Update deployment status (success) 42 if: success() 43 uses: chrnorm/deployment-status@v2 44 with: 45 token: ${{ github.token }} 46 state: success 47 deployment-id: ${{ steps.deployment.outputs.deployment_id }} 48 environment-url: https://daoko.likesyou.org/app/ 49 description: "Deployment successful" 50 - name: Update deployment status (failure) 51 if: failure() 52 uses: chrnorm/deployment-status@v2 53 with: 54 token: ${{ github.token }} 55 state: failure 56 deployment-id: ${{ steps.deployment.outputs.deployment_id }} 57 description: "Deployment failed"