diff --git a/.gitea/workflows/hugo-deploy.yaml b/.gitea/workflows/hugo-deploy.yaml new file mode 100644 index 0000000..2f8c937 --- /dev/null +++ b/.gitea/workflows/hugo-deploy.yaml @@ -0,0 +1,49 @@ +name: Gitea Actions - Hugo Deploy +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + branches: + - master +jobs: + Hugo-Deploy: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + + - name: Check out repository code + uses: actions/checkout@v4 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.134.1' # or remove this for the latest + extended: true + + - name: List files in the repository + run: | + ls + + - name: Build + run: hugo + + - name: 📂 SFTP uploader # Upload to SFTP + uses: wangyucode/sftp-upload-action@v2.0.4 + with: + host: ${{ secrets.NFSN_HOSTNAME }} # Recommended to put the credentials in github secrets. + username: ${{ secrets.NFSN_USERNAME }} + password: ${{ secrets.NFSN_PASSWORD }} + compress: false # Compression + forceUpload: true # Optional, Force uploading all files, Default to false(upload only newer files). + localDir: "/public/" # Required, Absolute or relative to cwd. + remoteDir: "/home/public" # Required, Absolute path only. + exclude: ".git,.DS_Store,**/node_modules" # Optional. exclude patterns (glob) like .gitignore, use ',' to split, Default to ''. + + + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file