diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index dcc8ccb..d7fe234 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -5,22 +5,30 @@ jobs: build: runs-on: act_runner1 container: - image: 192.168.254.5:5000/hugo:v0.163.3 + image: learngaming.top:5000/hugo:v0.163.3 steps: - name: Create Hugo site run: | set -e hugo new site /tmp/hugo-site + - name: Setup SSH key for git clone + run: | + set -e + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H gitea.learngaming.top >> ~/.ssh/known_hosts + - name: Clone FixIt theme run: | set -e - git clone --depth=1 http://192.168.254.5:3000/blogs/FixIt.git /tmp/hugo-site/themes/FixIt + git clone --depth=1 ssh://git@gitea.learngaming.top:2222/blogs/FixIt.git /tmp/hugo-site/themes/FixIt - name: Clone repository to content directory run: | set -e - REPO_URL="http://192.168.254.5:3000/blogs/outcomes.git" + REPO_URL="ssh://git@gitea.learngaming.top:2222/blogs/outcomes.git" if [ -n "${CI_REPOSITORY_URL:-}" ]; then REPO_URL="${CI_REPOSITORY_URL}" fi @@ -59,6 +67,6 @@ jobs: 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 + ssh-keyscan -H www.learngaming.top >> ~/.ssh/known_hosts # Deploy using rsync - rsync -avz --delete ./public/ root@192.168.254.5:/opt/1panel/www/sites/www.learngaming.top/index/ \ No newline at end of file + rsync -avz --delete ./public/ root@www.learngaming.top:/opt/1panel/www/sites/www.learngaming.top/index/ \ No newline at end of file