diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 4443c54..53abc5d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,6 +6,7 @@ jobs: runs-on: act_runner1 container: image: 192.168.254.5:5000/hugo:v0.163.3 + options: --privileged steps: - name: Create Hugo site run: | @@ -38,10 +39,12 @@ jobs: working-directory: /tmp/hugo-site run: | set -e - # Setup SSH key + # Copy config file from content directory to Hugo site root + cp content/config.toml /tmp/hugo-site/ + # Setup SSH key for Hugo deploy mkdir -p ~/.ssh echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan -H 192.168.254.5 >> ~/.ssh/known_hosts - # Copy files to remote server - rsync -avz --delete public/ root@192.168.254.5:/opt/1panel/www/sites/www.learngaming.top/index/ \ No newline at end of file + # Deploy using Hugo + hugo deploy \ No newline at end of file diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..13d624b --- /dev/null +++ b/config.toml @@ -0,0 +1,8 @@ +baseURL = "https://www.learngaming.top/" +title = "Learn Gaming" +languageCode = "en-us" + +[deployment] +[[deployment.targets]] +name = "production" +URL = "rsync://root@192.168.254.5:/opt/1panel/www/sites/www.learngaming.top/index"