Created
August 21, 2022 15:51
-
-
Save atakde/1f38ced82ebe0af048fbeeee8c4ce2bc to your computer and use it in GitHub Desktop.
Deploy in Digital Ocean With Github Actions
This file contains hidden or 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
| # This is a basic workflow to help you get started with Actions | |
| name: Build And Deploy | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the "main" branch | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy app | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.DO_HOST }} | |
| username: ${{ secrets.DO_USERNAME }} | |
| password: ${{ secrets.DO_PASSWORD }} | |
| script: | | |
| cd /var/www/html/ | |
| git pull | |
| yarn build | |
| echo "Deployment successful!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment