upload.yml 975 B

123456789101112131415161718192021222324252627282930313233
  1. name: CI
  2. # Controls when the action will run.
  3. on:
  4. # Triggers the workflow on push to master (including merged PRs)
  5. push:
  6. branches: [ master ]
  7. # Allows you to run this workflow manually from the Actions tab
  8. workflow_dispatch:
  9. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  10. jobs:
  11. # This workflow contains a single job called "build"
  12. update:
  13. # The type of runner that the job will run on
  14. runs-on: ubuntu-latest
  15. # Steps represent a sequence of tasks that will be executed as part of the job
  16. steps:
  17. - name: Updating website.
  18. uses: appleboy/ssh-action@master
  19. with:
  20. host: larbs.xyz
  21. username: larbs
  22. key: ${{ secrets.larbs_ssh }}
  23. passphrase: ${{ secrets.larbs_pass }}
  24. port: 22
  25. script: |
  26. cd larbs-src
  27. git stash
  28. git pull --force origin master
  29. hugo -s . -t /var/www/lugo -d ~/larbs --cacheDir ~/hugocache