diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index ed7473b..7c3ca34 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -8,7 +8,8 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest - + env: + GITHUB_SERVER_URL: "https://git.ericxliu.me" steps: - name: Checkout code uses: actions/checkout@v4 @@ -16,13 +17,6 @@ jobs: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Set up SSH - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -H git.ericxliu.me >> ~/.ssh/known_hosts - - name: Build site with Hugo uses: peaceiris/actions-hugo@v3 with: @@ -33,10 +27,9 @@ jobs: run: hugo --minify - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/master' }} + uses: peaceiris/actions-gh-pages@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + deploy_key: ${{ secrets.SSH_KEY }} publish_dir: ./public - name: Delete Kubernetes pod